• Hi!

    Is there a plugin which i can choose which links(or link categories) sit on which page?

    for example, homepage right menu has 4 links, click on a different page and it shows different links..

    Can anyone help?

    thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php
    // for use in sidebar, when viewing page,
    // use page title to retrieve links that have same category name as page title
    global $posts;
    if ( is_page() ) {
      $page_title = $posts[0]->post_title;
      $args = array(
        'category_name' => $page_title
      );
      wp_list_bookmarks($args);
    }
    ?>
    Thread Starter lumpycustard

    (@lumpycustard)

    Hi, thanks for that, but i can’t seem to get it to work, im assuming that i put this code somewhere in sidebar.php or am i wrong? if so, where?

    Thanks for your help.

    Yes, in your sidebar.php. I tested that using the WordPress Default theme’s wp-content/themes/default/sidebar.php and put that code just BEFORE this line:

    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Different Links on different pages’ is closed to new replies.