Support » Fixing WordPress » Sidebar Removal For Dummies Please?

  • Hello,

    I’m relatively new to WP so please be gentle. I’m working on a site that requires me to try display an externally hosted web page on one of my WP pages.

    I have no control over the attributes of this external page.

    I require a width of 774 pixels without having a horizontal scroll bar.

    I’m familiar with iframes and while not crazy about them it would be fine if I had the width to work with.

    I’ve made numerous attempts at using .js to “squeeze” the iFrame content but while I know it’s possible, I’ve come to the conclusion that actually doing this is beyond me. I just can’t wrap my head around it.

    Someone suggested using LightBox but unless I’m not getting something, I don’t see how this would integrate in as a regular page in the site.

    Another thing that I know is possible, but beyond my limited capacity, is to simply remove the sidebar on that specific page and not the others. Again – While I’m generally good at following step-by-step instructions, it seems all the dialogue on this that I’ve found requires me to actually know what I’m doing.

    I’d prefer just to remove the sidebar and let the frame take the whole width rather than to shrink the page in the iFrame, but I could live with either solution if it worked.

    Can anyone suggest a way to do this that I might be able to grasp?



Viewing 11 replies - 1 through 11 (of 11 total)
  • In WP you can create page templates, upload them, and then select which one you want for that page.

    See this page

    So you could create a template called “Single Column” or “No Sidebar” or whatever, and basically copy the index.php but remove the call to the sidebar.

    You might have to then change the CSS for that page, and make the main content area wider, to 774px. That means doing the changes in the theme’s stylesheet, but you would only want that to happen on your template. You could do this with a wrapper, .singleColumn, then wrap it around the Div for the content area in the Single Column page template.

    div.singleColumn {}
    div.singleColumn #content {width:774px;}

    That’s just an example, I don’t know exactly what your theme calls the content area.

    Do you know enough to understand about the theme stylesheet?

    I guess the way to put it is that I “sort of” understand.

    I understand the concept of the template but I’m not exactly clear on where. I see the instructions on the link however the “edit” option is not there in the page menu.

    The page is currently published as “private”.

    By creating this template called “sidebar” (or whatever) do you mean to create a page? I see not options to create a “template”.

    I’ve played with css a bit in CMSMS but in WP I don’t know where to find it or moreover how to find that which relates to any specific page.

    I don’t know what my theme calls the content area either? not sure where to find that.

    I’m using theme 1069

    I really appreciate the assistance.

    A page template is a file you create yourself, then upload to the theme folder: wp-content/themes/themeName

    Also in that folder is where you will find the theme’s stylesheet which is where you would make CSS changes.

    I am not sure which theme is 1069, they are usually identified with names.

    If this is that much beyond your WP/CSS abilities, you might want to look for a theme that allows you to create pages with 1 or 2 columns.

    That’s something that I found odd. This is the theme. It is named “theme1069” “author – Unknown”

    Also it does indeed have an option for 1 or 2 columns, but not 0

    I found the css page but I’m thinking this is beyond me. Funny – I would have thought this would be a simpler thing to do…

    It is unlikely you will have a 0 column template, after all where would the data go?

    A single column would usually be the entire width of the page, two column would probably be content area with sidebar and so on.

    @moodles is right there should be a template file in your directory for the theme. If you go into your dashbaord > appearance > editor you should see the files that your theme currently uses. One of them should be index.php or maybe page.php or single.php. One of these will have a statement to include a sidebar. The normal command would be something like <?php get_sidebar(); ?>.

    To remove the sidebar change <?php get_sidebar(); ?> to <?php //get_sidebar(); ?>. It is better to coment it out than remove completely, after all you might decide to have it back again.

    If you remove the sidebar, as said earlier you will need to fill the space that would normally be taken up by the sidebar or you page will stop as hits the width of the div inside the 1st column. That’s when you need to change the width in the CSS so that the div in the 1st will fill the entire column and not the space set for 1 column in a two column setup.

    There is no index.php

    I looked at page.php, single.php and style.css and see nothing looking like <?php get_sidebar(); ?>

    These are all the templates that I have listed there:

    Here are the pages that you suggested I look at. ( I think you can right click on these to view)

    I’m sure I’m missing something simple

    * Main Index Template

    Try looking at this one. This is in your templates list.

    I can’t open the other files as they require the includes etc. but thank you for trying to send them to me.

    It might be just get_sidebar() – without the <?php ?> open and closing brackets that run php in the page. It is a call to put the sidebar at that point on the page. However as index.php is in the templates list check that out first. If that draws a blank try the theme.php, I haven’t seen that file name before so it will be specific to this theme I think.

    The problem with code like WP is that is very flexible and can have many different themes running and so has ways of running the functions that you need to add tasks to the page. Some designers may not have sidebars at all – everything is in the header or footer so the get_sidebar() is never seen. It depends on how *your* theme has been put together by that designer, and there are lots of themes out there!

    OK – Ive found the get_sidebar in theMain Index Template

    So to remove the sidebar from the one page and make the area 775 wide is the goal now.

    Are you able to view it here?

    I would make this modification and replace the existing file? Or doess it reference another?

    I have this one page called “orders” published but currently private. while I work on it..One thing really confusing me is how it affects only that page.

    Is this the theme that I just exported?

    the page width comes from the CSS file. It is applied to the div.
    So, for example, <div class=”text-box”> in your php file should match a section in your CSS style sheet that looks like
    #test-box {
    *some code here*
    One of these might be width:???px;

    This is the code that defines how the div text-box will look, for example from one of my styles;-
    #outer {
    background: #fff;
    width: 960px;
    margin: 0 auto;
    text-align: left;
    padding: 10px;

    Another helpful tool is firefox with the firebug add-on. If you install this as your browser and add firebug you will be able to hover your mouse pointer over any point on a web site, right-click and select inspect element. This will show you the code and css at that point. Hover over the page you want to check, inspect it and on the right at the borttom of the screen a box will show the CSS that is current for that point, and where in the css style sheet you need to go to amend it.

    If you want to send me anything direct so it isn’t public on this forum feel free to do so at my email – support at virtualict dot co dot uk.

    If you make changes to the Main Index Template it will affect all the Pages.

    You have to create a new Template that you will upload and then apply to the page where you have the iframe.

    The easiest way to do this is copy the Main Index Template, then rename it. The name doesn’t matter; I name all my templates like this:


    starting with page-whatever so they all end up in the same place in the index of files.

    Then add at the top of your new template the WP required heading (NOT a header, just some code) — see this section from the page I linked to above:

    Template Name: Snarfer

    Then you can make changes to this new template, such as removing the sidebar and adjusting the width of the main text area to take up whatever space the sidebar left behind…

    Does this much make sense?

    AFter you do the above, then you need to locate the theme’s stylesheet, which will be in wp-content/themes/nameofyourtheme.
    It is usually called style.css.

    In there will be styles set for the width of the content area.
    THere is more than one way to do this.

    No you did not link to your theme, you linked to an RSS file.

    Get this much done, then post back.

    Well – A twist. It turns out that this off the shelf template that I was working with was actually custom….And not done that well…There for numerous reasons many of the recommendations I’ve been given here didn’t apply. It was all pretty sloppy.

    Knowing this, I was able to actually create the new template without the sidebar and get it to work.

    Nothing was where it was supposed to be and as such I was banging my head against the wall trying to figure out why typical functions were just not there.

    Thanks all!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Sidebar Removal For Dummies Please?’ is closed to new replies.