[Resolved] Hide sidebar widget from index page

Home Forums Support [Resolved] Hide sidebar widget from index page

Home Forums Support Hide sidebar widget from index page

  • This topic has 16 replies, 2 voices, and was last updated 4 months ago by Fernando.
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #2154787
    Petar

    Hello, is it possible to hide the sidebar widget only from desired pages? Index in this case. I had some plugins for that before but it is not compatible with the latest PHP version.

    thanks

    #2154805
    Fernando
    Customer Support

    Hi Petar,

    Yes, this is possible. To confirm, do you want to remove the entire sidebar or just a Sidebar widget?

    If you want to hide the entire sidebar for certain Pages, you may use a Layout Element.

    Here is an article with regards on how to use it: https://docs.generatepress.com/article/layout-element-overview/

    Otherwise, if you want to remove a sidebar widget, might I suggest that you add this Sidebar widget as a Block or Hook Element. Through this, you’ll be able to select which pages would have this widget and which ones wouldn’t through the Display rules.

    For instance: https://share.getcloudapp.com/QwuLe755

    Also see: https://share.getcloudapp.com/d5u9z0Rp

    This might also help: https://www.youtube.com/watch?v=1E7zFl678kg

    Hope this clarifies. 🙂

    #2156052
    Petar

    I am unable to do it. Maybe because I am using classic widgets and classic editor?

    #2156064
    Fernando
    Customer Support

    I see. Which specific functionality are you referring to? You would need to use the current WordPress default Gutenberg Block Editor to use a Block Element.

    Otherwise, you’ll need custom CSS code to hide certain sidebar widgets for certain pages.

    Hope this clarifies. Kindly let us know. 🙂

    #2156069
    Petar

    It is behind my knowledge. Is there some simple plugin like it was Advanced Tex Widget, that you are recommending? That one gave the simple dropdown menu below the widget where I could choose where the widget will be shown. Unfortunately,it doesn’t work with the latest Php version

    #2156080
    Fernando
    Customer Support

    What version of WordPress are you using? The Gutenberg Block Editor has been the default WordPress editor since version 5.0.

    If you’re using a plugin to revert the editor to the Classic editor, you’ll need to disable this to have access to more of our functionalities. I would suggest trying this first. 🙂

    I’m not aware of a plugin that has this functionality but if you prefer not to use the default Block Editor maybe you could link me to a page where this specific widget is visible and I’ll try to see if I can give a code to your preference.

    Hope to hear from you soon. 🙂

    #2156089
    Petar

    thanks. I am sending you detailed info in private information

    #2156096
    Fernando
    Customer Support

    If by index page, you mean the Blog archive page which is your Homepage, here is a CSS code you may try to remove that specific widget:

    .blog aside#recent-posts-widget-with-thumbnails-2 {
        display:none;   
    }

    Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css

    Adding it through additional CSS should work.

    Kindly let us know how it goes. 🙂

    #2157351
    Petar

    editing child theme helped. thanks

    #2157355
    Fernando
    Customer Support

    You’re welcome Petar! Glad to be of assistance! Feel free to reach out anytime if you’ll need assistance with anything else. 🙂

    #2170517
    Petar

    marking this as resolved

    #2185680
    Petar

    hm…problem appeared again. Code is still there in: GeneratePress Child: Stylesheet (style.css)

    #2185710
    Fernando
    Customer Support

    Hi Petar,

    May you kindly start a new topic and add the link to the specific page in question?

    You may use the private information field once more: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Hope to hear from you soon. 🙂

    #2186950
    Petar

    I am adding site here to avoid similar or duplicate posts. Ok?

    #2186968
    Fernando
    Customer Support

    Yes, that would be fine Petar!

    Can you try this CSS instead?:

    .blog aside.recent-posts-widget-with-thumbnails {
        display:none;   
    }

    This would remove any recent post widget that has a thumbnail in your blog page.

    Kindly let us know how it goes. 🙂

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