actionflickchick
Member
Posted 2 years ago #
I have left and right sidebars all throughout my website and like them that way. However, I need more room for the container on one specific page. I need to widen the widen and remove the left sidebar on http://actionflickchick.com/superaction/chick-pics while leaving the rest of my site alone.
actionflickchick
Member
Posted 2 years ago #
In more detail, you'll want to duplicate your theme's page.php and name it something like sidebar-right.php. Then add the following at the top:
<?php
/* Template Name: Right Sidebar */
?>
Then find the code that displays the left sidebar, something like
<?php (!dynamic_sidebar('Sidebar Top')) : ?> and delete that. You'll probably have some layout things to tweak so as not to leave a blank space, but you can widen your content area with CSS.
actionflickchick
Member
Posted 2 years ago #
Okay, http://actionflickchick.com/superaction/shop/ now has no left sidebar.
But how do I widen its WP container? Its width is determined on the stylesheet, not on the page template. I saw where to make the page use a different template, but nowhere to make it use a different stylesheet.
Ok, so you can use a css class in your page template. So for your container div, you'd have <div id="containter" class="nosidebar">. That way you can use separate styling for the elements on that page. In your CSS file, use #container.nosidebar. The # is for the id, and the . is for the class.
actionflickchick
Member
Posted 2 years ago #
Thanks for helping.
I have no idea what you just told me to do with the CSS file. Use #container.nosidebar where, how, and for what? I don't know squat about CSS.
actionflickchick
Member
Posted 2 years ago #
Here's the code for the custom page template. Exactly how do I widen the http://actionflickchick.com/superaction/shop/ container (the section with the merch info) by the space I saved when I removed the left sidebar?
[Moderated]
Ok, you did the right thing there. I removed your code because you're not allowed to paste lots of code in your post. No big deal, though.
Open your style.css file, and find #container. Copy everything after that in between the {}'s. Then, on a new line, put #container.1sidebar and paste what you just copied. Then, where it says width:XYZpx;, increase that number by one or two hundred pixels. Then just play around with the width until you get it where you like it.
actionflickchick
Member
Posted 2 years ago #
Okay, style.css has this: #container.1sidebar { [same style info as #container but 200 wider] }
Even though the 1Sidebar Page Template (page_no_left_sidebar.php) had successfully removed the left sidebar from http://actionflickchick.com/superaction/shop/ adding that #container.1sidebar to style.css did not affect the width. I'm still missing some step.
And thanks for all the input. Much appreciated as we work our way there.
I'm not good at table-based layouts. Try increasing the width to 900px and changing the float:left to float:right for both the container and right_sidebar. I really don't have much experience with tables, so maybe someone will have some ideas that doesn't have to get up from their desk and run in circles screaming for a while after working with that type of layout :D
actionflickchick
Member
Posted 2 years ago #
Okay, thanks.
Soooooooo back to the question: Can anybody else tell me how to widen the container at http://actionflickchick.com/superaction/shop/ because we haven't done it yet.
Creating 1Sidebar Page Template (page_no_left_sidebar.php) let me remove the left sidebar but we have been unable to alter the container width.
lilith70
Member
Posted 2 years ago #
I'm having the exact same problem. Has anyone come up with a solution? Even my local WP guys are giving me blank stares.
lilith70
Member
Posted 2 years ago #
HEY! I found a solution!
In my page, I took the instance of id="content" out of that first div tag in the custom template page, and it works great now!
Give that a try?