• Resolved sachi21

    (@sachi21)


    I did a search and noticed others had similar issues but really couldn’t find one that had an answer.

    the problem;
    My homepage has the sidebar and its respective links.
    However, once I click on any other page on the site, the sidebar content is no longer there.

    I looked within the index.php and single.php files and both have the sidebar command code; <?php get_sidebar(); ?>

    Thus, I’m not quite sure what the next step is to diagnose the problem if both templates have the appropriate command code.

    Thoughts?

Viewing 1 replies (of 1 total)
  • Thread Starter sachi21

    (@sachi21)

    Hey all,

    I asked around and the issue is fixed. It turns out that if/else statement in my sidebar.php template was missing the appropriate code that will list the sidebar in every page. Here is how to fix the issue;

    Before;

    <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar() ) : else : ?>
    <?php if(is_home() ) { ?>

    AFTER;

    <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar() ) : else : ?>
    <?php if(is_home() || is_page() ) { ?>

    I will close this thread.

    Mods, feel free to point people to this post if they have similar issues.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘which template to look into for a missing sidebar’ is closed to new replies.