WordPress.org

Ready to get started?Download WordPress

Forums

How to show two sidebars on the homepage, but only one on internal pages? (9 posts)

  1. saltlab
    Member
    Posted 4 years ago #

    Any ideas how to make a magazine-basic theme only show one sidebar on internal pages, like entries/posts?

    I can't figure out where the code is calling for sidebars on the internal pages.

    Thanks for your help,

    -James

  2. curtismchale
    Member
    Posted 4 years ago #

    <?php get_sidebar(); ?>

  3. saltlab
    Member
    Posted 4 years ago #

    I know I must sound like a moron, but I've searched every php page that WP is showing me in the Editor and I can't find a single instance of get_sidebar. What page should I be looking at?

    Thanks!

    -James

  4. Peter Boosten
    Member
    Posted 4 years ago #

    The sidebar doesn't necessarily have to be called by get_sidebar(), there are other ways as well.

    If it's a widgitized sidebar, look for dynamic_sidebar();

    If it isn't, then you're better off telling us the URL of your site.

    Peter

  5. saltlab
    Member
    Posted 4 years ago #

    Okay. It's magazine basic theme. http://www.wisconsinworldview.com

    Thanks!

  6. Peter Boosten
    Member
    Posted 4 years ago #

    Search in your theme directory for the following two items, then you'll know where your sidebars are:

    <div id="sidebar">

    <div id="secondsidebar">

    Peter

  7. saltlab
    Member
    Posted 4 years ago #

    Sorry, but none of the php pages listed in my editor has that code listed. Any other thoughts?

  8. Peter Boosten
    Member
    Posted 4 years ago #

    I'll download the theme and look through the code myself...

    But'll have to wait till tomorrow morning, signing off now ;-)

    Peter

  9. Peter Boosten
    Member
    Posted 4 years ago #

    Sorry, but none of the php pages listed in my editor has that code listed

    No offense, but I don't think you looked for it hard enough. those divs are in sidebar.php cq sidebar2.php.

    Nonetheless changing the theme the way you want to might prove to be tricky (at least). The sidebars are called from within functions.php, which uses options to decide whether 1 or 2 sidebars should be shown (all this from a quick glance at the code), and these options are global, not per page.

    Peter

Topic Closed

This topic has been closed to new replies.

About this Topic