If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
May 3, 2012 at 2:19 pm #12060
I have an interesting problem, I need to add just one sidebar to my contacts page not 2 sidebars!
I realize I can select how many sidebars I wish to display throughout the site as 1 from the control panel but 2 sidebars are great everywhere else! With just one sidebar the information would stretch to the right off the page! I don’t wish to add a sidebar anywhere else, for now anyway.
So then within that sidebar I can add the “Text” widget so that it displays one column text instead of two.
Is there any way I can do this!
Many Thanks for all your good advice.May 7, 2012 at 4:30 pm #74110
I think what you are looking to do is have just one sidebar display on your Contact page and 2 sidebars everywhere else? Is this correct?
If you can provide a link to your contact page with the 2 sidebars turned on, I think we might be able to help with some custom css to hide the sidebar you don’t want and make so it seems like there is only the one you want.
DevinMay 8, 2012 at 10:20 am #74111
Yes that is exactly what I am looking to do – have just one sidebar display on your Contact page and 2 sidebars everywhere else.
I did not think that there would ever be a need for it but it’s our College Site I’ve developed and the contact area needs to have some additional comments!
Here is the link to the contact page
The sidebar I do not want is the one to the very right. Also if at all possible is for the one sidebar to stretch and take up the space of the two sidebars.
I know you all must be extremely busy and I really appreciate all your help Devin!
Please let me know.
GeorgeMay 8, 2012 at 3:53 pm #74112
It looks like each sidebar isn’t being assigned a unique ID which means my original thought isn’t possible. I also tried creating a custom sidebar and assigning it to the contact template but the theme options overwrite the custom additions.
I think your only option is to edit the template_contact.php to force the page to be full width* and then create a new “sidebar-contact” class that you include as a container div in the html of the contact page. Make it float right and sort of fake the wide sidebar idea you are going for.
*If you open the template_contact.php file, on line 16 and 17 there are two $k_options. The first one is uncommented and gives the page a sidebar. Add // to the beginning of that line and remove them from the second line to make the page full width. It’ll look like:
//$k_option['custom']['bodyclass'] = ""; //<-- Display Sidebar
$k_option['custom']['bodyclass'] = "fullwidth"; //<-- Dont display Sidebar
DevinMay 9, 2012 at 12:35 pm #74113
Thank you so much for your insightful advice! That would explain why when I downloaded the plug in ” Custom Sidebar” and assigned it to a test contact page, it did create the sidebar in the widgets area but it did not do anything! I was at my wits end as to what was going on!
By biggest fear was that using plug-ins for that page would break the original template or mess up all the other ones.
I will give it a try and let know you how it goes!
GeorgeMay 11, 2012 at 7:01 am #74114
The topic ‘Add Just One Sidebar to a specific page.’ is closed to new replies.