Community Forums › Forums › Archived Forums › Design Tips and Tricks › Unregister sidebar widget in single page
Tagged: Outreach Pro, primary sidebar, remove, Sidebar, unregister, widget
- This topic has 7 replies, 2 voices, and was last updated 10 years, 3 months ago by wizz6113.
-
AuthorPosts
-
June 23, 2014 at 2:52 am #111124wizz6113Member
How do I unregister the default primary sidebar widget on single pages? I have installed the Genesis Simple Sidebars plugin, which is helping register bespoke widgets per page, but I simply want no widgets at all (but retaining sidebar space for the future) on some pages like this one:
http://wpreneur.com/iicss/about-iicss/fellows/
How do I go about it? In the simple hooks plug-in or hard code? I am using Outreach Pro.
Thanks!
http://wpreneur.com/iicss/about-iicss/fellows/June 23, 2014 at 3:56 am #111129Brad DaltonParticipantunregister the default primary sidebar widget on single pages
You mean remove the primary sidebar from single pages?
June 23, 2014 at 4:08 am #111131wizz6113MemberYes, Brad, that's what I mean - simply to not have that default black box and text showing up. If I put a blank text widget in a bespoke widget created using Simple Sidebar plugin, I still get a empty black box. I just need white space there!
Tnx!
June 23, 2014 at 4:23 am #111132Brad DaltonParticipantI would hide it using CSS.
Otherwise, you can create a template for single pages using the WordPress Template Hierarchy http://codex.wordpress.org/Template_Hierarchy
and add the remove action for the primary sidebar
The other option is to conditionally remove the sidebar using a custom function.
Where is the black box? Please link to it.
June 23, 2014 at 4:28 am #111133wizz6113MemberBrad, thanks for this.
The 'black box' is basically the widget box (in my theme coloured black as background) which shows either the default primary sidebar prompt or a content-empty box when I tried my (failed) workaround of creating an empty text box for a new widget using simple sidebars plugin. As per this eg: http://wpreneur.com/iicss/about-iicss/fellows/
If I opt to remove the hook for the sidebar how and where can I do it for single pages / posts? I have the Simple Hooks plug in installed.
In CSS, I have no idea where to attempt to hide some page (or post) IDs to get it removed on single pages / posts only. Any quick links or idea to help?
Tnx for all!
June 23, 2014 at 4:52 am #111134Brad DaltonParticipantI don't see any black box except for the footer. http://wpsites.net/web-design/genesis-3-ways-to-remove-the-primary-sidebar-from-single-pages/
June 23, 2014 at 5:39 am #111136wizz6113MemberThanks Brad, it's the black default widget background in the right sidebar, but not to worry. It now seems I simply need to remove the primary sidebar widget altogether, on all pages, not single ones, so perhaps that makes life easier?
I'll go see your link above to see if that helps.
Cheers,
June 23, 2014 at 5:59 am #111138wizz6113MemberHI Brad, very simple solution to my issue - as it's not now custom sidebar per page / post but remove altogether; I just chose a different page template for each page to suit!
Feel really silly not thinking of that earlier. But your info v useful for a future job I need to do on another site. Thanks so much.
-
AuthorPosts
- The topic ‘Unregister sidebar widget in single page’ is closed to new replies.