Trouble showing blogroll on pages other than home

Discussion in 'WordPress' started by jg123, Oct 5, 2007.

  1. #1
    I am having a bit of trouble over at topmusicgossip.com the blogroll links show on the home page but not when you click on a post. I see the call for the sidebar, so I am not sure why it is not bringing the entire thing (including blogroll). Hoping one of your gurus can help.

    thanks
     
    jg123, Oct 5, 2007 IP
  2. Deano

    Deano Sail away with me.

    Messages:
    890
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is probably coded into the template.
    There is an option to show the blogroll only on the homepage or sitewide when you write the code (I always write wordpress themes to be homepage only).
    So you have two options
    1 change theme
    2 replace the code in the sidebar

    with

     
    Deano, Oct 5, 2007 IP
    kentuckyslone likes this.
  3. jg123

    jg123 Notable Member

    Messages:
    6,006
    Likes Received:
    387
    Best Answers:
    0
    Trophy Points:
    295
    #3
    Here is the existing code, how do I change it to suit my needs?

    <?php if ( is_home() ) { ?>

    <h2><?php _e('Blogroll'); ?></h2>

    <ul>

    <?php get_links(-1, '<li>', '</li>', '', FALSE, 'name', FALSE, FALSE, -1, FALSE); ?>

    </ul>
     
    jg123, Oct 5, 2007 IP
  4. Deano

    Deano Sail away with me.

    Messages:
    890
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi there jg123,
    sorry i was getting ahead of myself there with the editing :)

    if you replace the code shown in the quotes on my post above (iwhat you have highlighted plus <?php } ?>

    to

    <h2>Blogroll: </h2>
    <ul>
    <?php get_links_list(); ?>
    </ul>

    It should hopefully work ok
    (i'm just uploading to a theme viewer to test so bear with me :)
     
    Deano, Oct 5, 2007 IP
    jg123 likes this.
  5. jg123

    jg123 Notable Member

    Messages:
    6,006
    Likes Received:
    387
    Best Answers:
    0
    Trophy Points:
    295
    #5
    hehehe, I will wait till you can tell me exactly which code to change.
     
    jg123, Oct 5, 2007 IP
  6. Deano

    Deano Sail away with me.

    Messages:
    890
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hold the front page!
    Try this instead

    Replace
    with

    <h2><?php _e('Blogroll'); ?></h2>
    <ul>
    <?php get_links_list(); ?>
    </ul>

    I've tested this it works in mine :)
     
    Deano, Oct 5, 2007 IP
  7. jg123

    jg123 Notable Member

    Messages:
    6,006
    Likes Received:
    387
    Best Answers:
    0
    Trophy Points:
    295
    #7
    Mmmm, take a look. It is sorta working but there is not a duplicate title of 'blogroll'.
     
    jg123, Oct 5, 2007 IP
  8. Deano

    Deano Sail away with me.

    Messages:
    890
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ok try removing this line

    <h2><?php _e('Blogroll'); ?></h2>
     
    Deano, Oct 5, 2007 IP
  9. jg123

    jg123 Notable Member

    Messages:
    6,006
    Likes Received:
    387
    Best Answers:
    0
    Trophy Points:
    295
    #9
    That did it, thank a ton!
     
    jg123, Oct 5, 2007 IP
    Deano likes this.
  10. Deano

    Deano Sail away with me.

    Messages:
    890
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Cool, glad to be of help :)
     
    Deano, Oct 5, 2007 IP