Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] Disable elements on Blog-page does not work

Home Forums Support [Resolved] Disable elements on Blog-page does not work

Home Forums Support Disable elements on Blog-page does not work

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #576423
    steffen-bachmann

    Just found, that disable elements on the blog-page is not working, on all other pages it works.
    Also… how can i use disable elements and other features on category-pages?

    At the moment, i disable the footer-widgets with that css:

    body:not(.home) .footer-widgets{display: none;}

    On all pages i can set the number of widgets in the footer to 0 (per page), so in the start-page i have 3 footer widgets visible, but on blog-page this is not working.
    I also tried to disable e.g. primary navigation on blog-page, its also not working.

    Thanks
    Steffen Bachmann

    GeneratePress 2.1.1
    GP Premium 1.6.2
    #576445
    Leo
    Staff
    Customer Support

    Hi there,

    WordPress ignores all metabox values on index pages (blog, archive etc) by default which is why it isn’t working.

    I would recommend using the filter to set footer widgets in this case:
    https://docs.generatepress.com/article/footer-widgets/#changing-the-numbers-of-widgets-using-a-filter

    Let me know if you need specific condition, I can provide the full code πŸ™‚

    #576472
    steffen-bachmann

    Ah, ok, i understand. I did not know that.
    The solution via filters looks complicated to me. At the moment my css-snippet works fine for me.

    In case that not, i can negate the condition (i think):
    Define globaly 0 widgets in footer, so on blog and other pages they should not appear, but set for individual pages the widgets.

    Sometimes i think too complicated, sorry πŸ˜‰

    #576482
    Leo
    Staff
    Customer Support

    Yup that’s a good solution too πŸ™‚

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