WordPress.org

Support

Support » How-To and Troubleshooting » Link Categories Designated To A Page?

Link Categories Designated To A Page?

  • Lets say I have 50 link Categories. Is it possible to create 50 pages and designate one link category to each of the 50 pages?

    If so how would I do this?

    Is it possible to show me this in an example inside an <ul></ul>

    Thanks

Viewing 1 replies (of 1 total)
  • 1. Change to the WordPress Default Theme:
    2. Save this code as wp-content/themes/default/linkcats.php

    <?php
    /*
    Template Name: LinkCats
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php
    $page = get_query_var('page_id');
    $key = 'link_cat';
    $link_cat = get_post_meta($page, $key, TRUE);
    ?>
    
    <div id="content" class="widecolumn">
    
    <h2>Links:</h2>
    <ul>
    <?php wp_list_bookmarks('category='.$link_cat); ?>
    </ul>
    
    </div>
    
    <?php get_footer(); ?>

    3. Create the 50 Pages, and on each Page assign a Custom Field with a key of ‘link_cat’ and a value of the Link Category you want to see on each Page. Also to each Page, assign the Template LinkCats.

Viewing 1 replies (of 1 total)
  • The topic ‘Link Categories Designated To A Page?’ is closed to new replies.
Skip to toolbar