WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar not complete on Comments Page (12 posts)

  1. grafx77
    Member
    Posted 8 years ago #

    My sidebar only shows categories on the comments page and nothing else? If you go to my homepage on my blog at http://www.gamerentalguide.com/blog and notice how the sidebar is setup and now click on one of my test posts, you will see that my sidebar only shows the search and categories.

    How can I retrieve the same sidebar as posted on my homepage? I am using the same <?php get_sidebar(); ?> tag for all pages.

  2. moshu
    Member
    Posted 8 years ago #

    I assume you are working from the K. (default) theme. Check your sidebar.php template file for a bunch of if_statements and edit them.

  3. grafx77
    Member
    Posted 8 years ago #

    Yes, I am using the default theme. I see nothing unusual with the if_statements to warrant anything peculiar. I am not a .php coder either, but know enough to do some editing from time to time.

    I need more help with this. If anyone needs to look at my single.php or sidebar.php script, let me know.

  4. grafx77
    Member
    Posted 8 years ago #

    Can someone please help me with this?

  5. moshu
    Member
    Posted 8 years ago #

    Believe me, your problem is what I stated above. When you edited the original sidebar.php you didn't watch where did you put your stuff. There is a bunch of code in there saying: if this is the homepage - show this, if this is an archive page - show that, if is category - show whatever.
    Start over... or paste your sidebar.php code to http://pastebin.com

  6. grafx77
    Member
    Posted 8 years ago #

    Ok....I took at second look at my sidebar.php script and noticed one line that stated exactly this:

    <?php /* If this is a category archive */ } elseif (is_category()) { ?>
    You are currently browsing the archives for the <?php single_cat_title(''); ?> category.

    The problem is, I do not know what to edit or add to this line in order for it to show all my links instead of just the categories on the comments page. What do I add to this line of code. If I knew how to edit it, believe me, I would not be asking for help on here.

    Thank you for your time,
    John

  7. moshu
    Member
    Posted 8 years ago #

    Please, read again the last line of my reply :)
    (and post back with the URI)

  8. grafx77
    Member
    Posted 8 years ago #

    ok...here is the URI: http://pastebin.com/463143

  9. moshu
    Member
    Posted 8 years ago #

    Try this one, hope it works:
    http://pastebin.com/463148

  10. grafx77
    Member
    Posted 8 years ago #

    YEsssss....works like a charm! Thank you very much. Was there much that you changed?

  11. moshu
    Member
    Posted 8 years ago #

    As I suspected... you had this line:
    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    and all your sidebar items came after this line, which means they were displayed only if it was the main page (=home) or a Page. The end of the code is this
    <?php } ?>
    I just took out everything from there and moved above the first code line.

  12. grafx77
    Member
    Posted 8 years ago #

    Ahh....thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic