- This topic has 16 replies, 2 voices, and was last updated 4 months ago by
Fernando.
-
AuthorPosts
-
March 14, 2022 at 8:30 pm #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
March 14, 2022 at 8:56 pm #2154805Fernando 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. 🙂
March 15, 2022 at 6:21 pm #2156052Petar
I am unable to do it. Maybe because I am using classic widgets and classic editor?
March 15, 2022 at 6:42 pm #2156064Fernando 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. 🙂
March 15, 2022 at 6:46 pm #2156069Petar
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
March 15, 2022 at 7:13 pm #2156080Fernando 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. 🙂
March 15, 2022 at 7:32 pm #2156089Petar
thanks. I am sending you detailed info in private information
March 15, 2022 at 7:46 pm #2156096Fernando 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. 🙂
March 16, 2022 at 7:34 pm #2157351Petar
editing child theme helped. thanks
March 16, 2022 at 7:43 pm #2157355Fernando 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. 🙂
March 28, 2022 at 5:46 pm #2170517Petar
marking this as resolved
April 11, 2022 at 5:18 pm #2185680Petar
hm…problem appeared again. Code is still there in: GeneratePress Child: Stylesheet (style.css)
April 11, 2022 at 6:32 pm #2185710Fernando 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. 🙂
April 12, 2022 at 6:39 pm #2186950Petar
I am adding site here to avoid similar or duplicate posts. Ok?
April 12, 2022 at 7:20 pm #2186968Fernando 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. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.