WordPress.org

Ready to get started?Download WordPress

Forums

Creating a post type list (2 posts)

  1. sheyes@s-heyes.com
    Member
    Posted 1 year ago #

    I've managed to create a list using the below snippet of code I found online

    $taxonomy     = 'creditlibrary_type';
    $orderby      = 'name';
    $show_count   = 1;      // 1 for yes, 0 for no
    $pad_counts   = 1;      // 1 for yes, 0 for no
    $hierarchical = 1;      // 1 for yes, 0 for no
    $title        = '';
    
    $args = array(
      'show_option_all'    => '',
      'taxonomy'     => $taxonomy,
      'orderby'      => $orderby,
      'show_count'   => $show_count,
      'pad_counts'   => $pad_counts,
      'hierarchical' => $hierarchical,
      'title_li'     => $title
    );
    ?>
    
    <ul>
    <?php wp_list_categories( $args ); ?>
    </ul>

    The above code generates the following
    http://www.creditmatters.com.php53-13.ord1-1.websitetestlink.com/credit-library/

    How can I make this code list the post under each 'taxonomy'? For example under "How To Read A Credit Report" I need to list the 4 posts that it shows in the brackets, and then link to that post?

  2. sheyes@s-heyes.com
    Member
    Posted 1 year ago #

    I realize I need to explain some more actually...

    I dont want what is currently showing to be linkable, I only need to the links of the posts within the taxonomy types if that makes sense.

    I'm trying to replicate this http://gocreditmatters.com/2012CMsite/CM_creditlibrary.php

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.