Support » Fixing WordPress » How to add content to sidebar of a page

  • I went into my theme and then went into the editor. I went down to side bar and I went in and add a picture and text. I only wanted it to show up on one of my pages, but when I clicked on each page it showed up!Can someone please help me add content to the side bar of a page. There is different content that I want on the side bar of each page. Thanks

Viewing 15 replies - 1 through 15 (of 25 total)
  • A widgetized area (most likely what your sidebar is) is made to be displayed on all pages. I’m not completely sure how you could change it, but I would say you have to go into the Theme Editor and edit the code. Using Custom Fields within a template might work. It depends if you think you are able to do it.

    Well, sidebar implementation is going to vary theme by theme, but the general trend is that one or two sidebars are used across multiple pages on a site, rather than providing a one-to-one relation.

    If you want every single page to have a different sidebar (no shared elements whatsoever), probably the simplest way to go about this is to remove the sidebar from the theme’s template file, extend the width of the main content area, and embed the sidebar in the page’s content (create a style for your sidebar and use that style in the HTML).

    If you have a relatively small number of pages (something like less than 10-15), you could modify the theme to declare sidebars for each page. In your theme’s functions.php file, you’d want a block that runs a query for all the pages in your site, then runs register_sidebar using the page’s id in the sidebar id.

    Something like…

    $pages = new WP_Query('post_type=page');
    $currpage = null;
    while( $pages->have_posts() ){
        $currpage = $pages->next_post();
           'name' => $currpage->post_title.' Sidebar',
           'id'   => $currpage->ID.'-sidebar'

    Haven’t fully sanity checked that code block, but that should get you on the right track if you choose to go that route. But, once again, I wouldn’t recommend it unless you have a relatively small set of pages. For lots of pages, you’d probably wanna look into removing the sidebar altogether or using a plugin that gives you some control over a block in your sidebar.

    I hope this helps!

    I dont really want to create a different sidebar for each page. I just have differnt content that I want to put on each page. My problem is that when I am trying to add stuff to a page It seems like things are more to the left and I dont have anything to the right so when I added something to the side bar it filled it in. But it was on every page.I am very new to all this! Is there like plugin or wiget or something that will give me differnt option for a layout of a page?? So all I have to do is add text and upload images?

    Also what plugin are you refering to that will give me control over a block in my sidebar?

    If I give you my info can you look at my site so you can see what exactly I am talking about, and maybe you would know the best way to help me. Thanks so much!!

    Can you give us a URL so we can see what you mean?

    I think this is it:-/

    Ok I made it public only for you to view it!! I have a few questions.

    1.How would I change the font size for the part that says Welcome to and the small text that is under that??

    2. Do you see how mu twitter stream messed up the texted below it? Is it a way to move that twitter stream up some so that it doesnt throw off the text?

    3. How can I add more pics to the homepage where the pics are flashing?

    4. Oh and how can I move the twitter, facebook, linkedin to the top right of page instead of the bottom.

    I know these are alot of questions! If you cant answere them I understand! Also if i give you my log in info would you be willing to make some of the changes. I am super new to this, and im anxious to get my site going! Thanks for your time!

    Sorry, that link isn’t quite working for me… It’s giving me a title – Mary Sheffield – but apart from that it’s just constantly loading nothing…

    Is your domain name linked to your host yet?

    Wait, no, it’s loaded. Sorry, just took about a minute. It was probably just my incredibly slow Internet.

    Ok good!

    OK, I see. So that sidebar content – you only want that to appear on one of the pages? Or would you prefer to actually get rid of it and have the rest of the content spread out? Generally sidebars are used for content that will be the same across all pages, much like the navigation at the top – things like Recent Blog Posts, etc.

    I only wanted it on the page that says First Steps. I really dont have to do a side bar, but I didnt know how to spread out the content so that I can have pics and texts etc..

    If I were you, I’d get rid of the sidebar completely. Go to Appearance, Editor and then you should be able to see on the right a link to “Page Template”. Click on that.

    Copy all of the text in this template to Notepad or TextEdit, just as a backup.

    Now somewhere on there is “<!–Start Sidebar–>” and “<!–End Sidebar–>”. Delete these tags and everything in between, Update, see what happens…

    IT took away side bars

    Hmm… ok… let’s see…

    1. Haven’t worked with canvas tooo much, but my gut says the styles.css file would be a good place to start. You’d want to modify the CSS record for .header-info h1, which has a font-size attribute in it. The small text under that would be .header-info h2.

    2. Are you wanting to replace that whole sidebar area with your Twitter feed? It looks like there’s some content already there that’s pushing your Twitter feed downward. You can also modify the height of the Twitter feed by modifying the height attribute in the pasted script code (where the new TWTR.Widget is defined), as well as removing the padding-top rule from the .slider-info element.

    3. In your theme, look for div id=”slides” and add more slides. Follow the syntax of the slides that are already there (div class=”slide”) as a guide. That said, your theme could be dynamically generating these, in which case there’s probably something in your admin panel that you can use to modify the slideshow.

    4. You mean where the … is? I’d start by cutting and pasting the code <ul id=”social-logos”>… and modifying from there. Probably some CSS tweaking should do the trick.

    Well, after writing that and refreshing the thread to check for updates, looks like is on the right track with the sidebar issue, so I’d try that out… toss out the sidebar and put the sidebar content you want for that particular page as part of the page.

    I hope this helps!

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘How to add content to sidebar of a page’ is closed to new replies.