WordPress.org

Ready to get started?Download WordPress

Forums

Is there a links manager plugin to allow what links show? (3 posts)

  1. Silvetti
    Member
    Posted 9 years ago #

    Hi,

    I use the links manger for 2 locations.
    1. for my sidebar
    2. on a full page.

    Now I wondered if there was a plug-in that would allow me to select what links I want to show in my sidebar.

    That way I can then show every link I have on my full page.

    Can this be done?

    Thanks

  2. clydejones
    Member
    Posted 9 years ago #

    I use this code for my sidebar:
    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories where cat_id=9 order by cat_name");
    foreach ($link_cats as $link_cat) {
    ?>
    <h4 id="linkcat-<?php echo $link_cat->cat_id; ?>"><?php echo $link_cat->cat_name; ?> </h4>
    <ul>
    <?php wp_get_links($link_cat->cat_id); ?>
    </ul>
    <?php } ?>

    And this is what I use for my links page:
    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories WHERE cat_id<>11 and cat_id<>9 ORDER by cat_name");
    foreach ($link_cats as $link_cat) {
    ?>
    <h3> <?php echo $link_cat->cat_name; ?> </h3>
    <ul>
    <?php wp_get_links($link_cat->cat_id); ?>
    </ul>
    <?php } ?>

    Hope it helps.

  3. Silvetti
    Member
    Posted 9 years ago #

    Thanks for that but that wouldn't allow me to pre-select certain links to show in the sidebar.

    Thanks anyway

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.