WordPress.org

Ready to get started?Download WordPress

Forums

How to add content to sidebar of a page (26 posts)

  1. msheffield
    Member
    Posted 2 years ago #

    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

  2. the.green.timtam
    Member
    Posted 2 years ago #

    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.

  3. zimmi88
    Member
    Posted 2 years ago #

    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();
        register_sidebar(array(
           '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!

  4. msheffield
    Member
    Posted 2 years ago #

    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!!

  5. the.green.timtam
    Member
    Posted 2 years ago #

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

  6. msheffield
    Member
    Posted 2 years ago #

    http://204.16.129.84/

    I think this is it:-/

  7. msheffield
    Member
    Posted 2 years ago #

    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 MarySheffield.com 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!

  8. the.green.timtam
    Member
    Posted 2 years ago #

    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?

  9. msheffield
    Member
    Posted 2 years ago #

    marysheffield.com

  10. the.green.timtam
    Member
    Posted 2 years ago #

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

  11. msheffield
    Member
    Posted 2 years ago #

    Ok good!

  12. the.green.timtam
    Member
    Posted 2 years ago #

    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.

  13. msheffield
    Member
    Posted 2 years ago #

    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..

  14. the.green.timtam
    Member
    Posted 2 years ago #

    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...

  15. msheffield
    Member
    Posted 2 years ago #

    IT took away side bars

  16. zimmi88
    Member
    Posted 2 years ago #

    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 the.green.timtam 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!

  17. the.green.timtam
    Member
    Posted 2 years ago #

    If you're not too HTML savvy, I'd say there's not really a way you can do it apart from this...

  18. msheffield
    Member
    Posted 2 years ago #

    But now gow do I add that logo that I had? I also want more pics, maybe strolling pics or something

  19. msheffield
    Member
    Posted 2 years ago #

    How do I do this???(This is what you wrote)

    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.

  20. the.green.timtam
    Member
    Posted 2 years ago #

    Sorry... I'm not too sure that I can help...

  21. msheffield
    Member
    Posted 2 years ago #

    ok thanks!

  22. the.green.timtam
    Member
    Posted 2 years ago #

    Wait, actually, it looks like the theme you are using has a "Full Width" page template. If you go to the right of the post editor you can change the template of your page to Full Width. The sidebar will disappear and you can add the content as you please by uploading and floating the images to the right...

    Maybe that would work???

  23. msheffield
    Member
    Posted 2 years ago #

    I tried to the full width page but I was still having trouble spreading the content across the page. How do you float images to the right?

  24. zimmi88
    Member
    Posted 2 years ago #

    How do I do this???(This is what you wrote)

    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.

    Well, you've tossed out the sidebar... looking good so far. I notice that the page content isn't stretching all across the page as desired. Make this change...

    In single.php (I think... that's my best guess where this code lies):
    Look for <div class="grid_16 alpha"> and replace "grid_16" with "grid_23". That'll stretch the content across most of the way.

    Now, as for adding the images back in... I'd try adding the images that were in the sidebar to the post's content itself as right-aligned images. If that doesn't look quite right, remove the images from the post and place them in a <div> block as such...

    <div style="float:right; width: 225px; margin-left: 10px;><img src="..." alt="Alt text" /><br /><img src="..." alt="Alt text" /></div>

    The dots should be replaced with the URL path to the images.

    Lemme know if this works ok.

  25. the.green.timtam
    Member
    Posted 2 years ago #

    Yeah, sorry. I thought I knew how to float images to the right, but it doesn't seem to be working in my editor... strange...

  26. msheffield
    Member
    Posted 2 years ago #

    Ok I am going to try this first thing in the morning! Im getting sleepy:) But one more question If you look at the Bio page to me it seems a little off. LIke the text is off or something. Any suggestions for this, or anythinig I can add to make that page look better? Youve been a great help. I am going to continue to send ou message throught the process of me creating my site! Cant wait to see the final product!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.