Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Different Sidebars for WordPress

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #24198
    louckster
    Member

    Hello gang,

    I’m currently in the process of putting my CSS/XHTML theme into WordPress. So far so good except when it comes to the sidebars.

    When I designed my theme I made it so that each page would have a different "sidebar". Now that have in WordPress I can’t figure out how to achieve this.

    So what I don’t want is the homepage/blog sidebar to appear on the about, portfolio etc., pages of my website. Can someone guide me in the right direction?

    Thank you,
    Jason Loucks

    #53971
    ikthius
    Member
    "louckster" wrote:
    Hello gang,

    I’m currently in the process of putting my CSS/XHTML theme into WordPress. So far so good except when it comes to the sidebars.

    When I designed my theme I made it so that each page would have a different "sidebar". Now that have in WordPress I can’t figure out how to achieve this.

    So what I don’t want is the homepage/blog sidebar to appear on the about, portfolio etc., pages of my website. Can someone guide me in the right direction?

    Thank you,
    Jason Loucks

    I think your going to use wordpress as a cms, in that the posts are for your blog, but your about may be a static page.

    if so, you might want to look at making your own template page, like chris done on one of his tuts here
    https://css-tricks.com/video-screencasts … -as-a-cms/

    or in the page.php in your theme folder, just don’t add in the link to your sidebar.

    ik

    #54234
    louckster
    Member

    Hi,

    Well I’m going to have a blog to. But I guess mainly a Content Manager.

    Jason Loucks

    #54235
    Rob MacKay
    Participant
    #53819
    ikthius
    Member
    "louckster" wrote:
    Hi,

    Well I’m going to have a blog to. But I guess mainly a Content Manager.

    Jason Loucks

    you can have he whole site through wordpress, but I have only my blog running on its own. the rest is just static:
    http://www.woskf.co.uk the blog is the news, that is the only bit that runs on wordpress,

    #53820
    louckster
    Member

    So I removed <?php get_sidebar(); ?> from my page.php but now I’m still lost in what to do.

    #53821
    louckster
    Member

    So I created a file called sidebar-about.php and I put in the following:

    <?php
    /*
    Template Name: Sidebar About
    */
    ?>

    <?php get_header(); ?>

    <div id="content-right">

    <h1>General Information</h1>

    <p><strong>Name:</strong> Jason Loucks<br />
    <strong>Date of Birth:</strong> October 18, 1982<br />
    <strong>Age:</strong> Twenty-six (26)<br />
    <strong>Birthplace:</strong> Gloversville, New York<br />
    <strong>Location:</strong> United States</p>

    </div><!– END right-col –>

    <?php get_footer(); ?>


    When i view the about page all I get is the sidebar. Should I add the entire about coding?

    #53833
    Chris Coyier
    Keymaster

    What you did there is create a special page template. If you want your about page to use that instead, you’ll have to select it from the Page Template dropdown when editing that page.

    I see it doesn’t contain the get_sidebar(); function, so it will not have a sidebar if that’s what you intend.

    At all that get_sidebar(); function does is go grab the sidebar.php file and drop it in right there. If you want to have a DIFFERENT sidebar, you could just do a manual include of a different file. Like this:

    Code:
    #54242
    louckster
    Member

    Thanks everyone,

    I finally figured it out. It took awhile but I got it. Thanks for all of you help! :D

    #82472
    mlynn
    Member

    You could also use a plugin like the Graceful Sidebar Plugin which lets you add custom content to a sidebar for each page or post.

    #82483
    TheDoc
    Member

    @mlynn – you just dug up a thread that is over two years old to promote your own plugin. Naughty naughty.

    #82484
    Trego
    Member

    @TheDoc -I fully agree with you that he is just promoting his own plugin

    Mod edit: Link removed

    #82486
    TheDoc
    Member

    Says the guy with a weird Blackberry link at the bottom of his post…

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Back End’ is closed to new topics and replies.