Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

show/hide blog posts on home page

  • Hi,
    I have 3 blog posts showing in an area on the bottom of the home page.
    The home page displays a static page (home). I have other content (text and featured image) above this.

    These blog posts are meant to announce upcoming events.

    Is there a way to show no posts on the home page if there are no scheduled events without deleting all the existing post entries? Old posts need to be saved, so they can be updated and shown on the home page again later for a recurring event. Do you do this by putting them into another category? Can you choose which category gets shown on the home page? Can you change a blog posts category? Or is there another way?

    Also, if there are no blog posts shown on the homepage, can the heading “Aktuelles” and any extra space be removed automatically? If the heading can’t be removed, can there be a default text showing underneath?

    Thanks
    Mel

    Blog posts on home page: https://snipboard.io/mV3ILd.jpg
    Blog posts: https://snipboard.io/mV3ILd.jpg

  • Hi there,

    Is there a way to show no posts on the home page if there are no scheduled events without deleting all the existing post entries?

    Since you have GB pro, you can just manually turn on all three hide-on options on the GB container that’s holding the query loop block when you don’t want them to show:
    https://docs.generateblocks.com/article/advanced-options-overview/#hide-on-options-pro-feature

    That’s the only solution I can think of without a custom coded solution.

    Hope this helps 🙂

  • Thanks. The home page section for blogs shows up to 3 blog posts.

    How do I solve the following:

    1. Option to either show 0, 1 or 2 posts at different times (this will change depending on client’s situation)

    Would the following work (without deleting blog posts that may be re-used again as templates for new posts):

    Keep either 0, 1 or 2 Blog Posts in “Posts” that are required to show in Home

    Put the remaining blog posts into “Trash”, keep them there for storage (don’t empty trash). Can they be put back from trash later one by one when they are needed again fr re-use?

    Or could this be solved differently by:

    Putting the posts for storage into their own category (1) and the posts that are meant to show on Home into another category (2). Then choose settings to show posts on home only from (2).

    Would this work? If yes how can I set this up (choose settings to show posts on home only from (2)?

    Thanks!

  • How do I solve the following:

    1. Option to either show 0, 1 or 2 posts at different times (this will change depending on client’s situation)

    The only option available in GB that would help with this is the hide-on option I recommended in my initial reply. If you need to implement more complicated logic then a custom solution is likely required – this is something we cannot help with here.

    Unfortunately I don’t quite get what you are trying to do based on your description above.

    Have you considered trying them and determining if the solution work or not?

  • Thanks, I have worked it out.

    If I change my posts to draft they won’t show on the Home page, so this lets me control how many posts show.

  • Glad to hear.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.