WordPress.org

Ready to get started?Download WordPress

Forums

How would you hook a custom bookmark link? (2 posts)

  1. bleem71
    Blocked
    Posted 1 year ago #

    Hi,

    I was wondering if you could somehow add a bookmark link (wp-admin/link-add.php) to a list of categories (custom taxonomy) and output it to a page which would then produce a list of my custom categories and whatever book mark links I so desired?

    This is the code for producing the category list:

    // categories list display
    function cp_create_categories_list( $location = 'menu' ) {
    global $app_abbr;
    
    $prefix = $app_abbr . '_cat_' . $location . '_';
    
    $args['menu_cols'] = ( $location == 'menu' ? 3 : get_option($prefix . 'cols') );
    $args['menu_depth'] = get_option($prefix . 'depth');
    $args['menu_sub_num'] = get_option($prefix . 'sub_num');
    $args['cat_parent_count'] = get_option($prefix . 'count');
    $args['cat_child_count'] = get_option($prefix . 'count');
    $args['cat_hide_empty'] = get_option($prefix . 'hide_empty');
    $args['cat_nocatstext'] = true;
    $args['cat_order'] = 'ASC';
    $args['taxonomy'] = APP_TAX_CAT;
    
    return appthemes_categories_list( $args );
    
    }

    And this is the call that outputs it to the page called mysite.co.uk/categories

    <?php echo cp_create_categories_list( 'dir' ); ?>
  2. bcworkz
    Member
    Posted 1 year ago #

    You can output a list of selected bookmarks just with wp_list_bookmarks(). Essentially two separate lists, even if they are formatted as one. But if you want the bookmarks sorted a particular way along with your categories, you'd have to cache the output and process accordingly.

Topic Closed

This topic has been closed to new replies.

About this Topic