WordPress.org

Ready to get started?Download WordPress

Forums

custom post types - wp_list_categories() - edit title attribute (1 post)

  1. morsecodemedia
    Member
    Posted 2 years ago #

    I have a few different custom post types and taxonomies in my site. I can list each specific set of taxonomies for each custom post type just fine, but the title attribute will remain "View all posts filed under..." I'd like to be able to change that based on each custom post type.

    This is where I've gotten so far...

    $taxonomy = 'port_cats';
    $orderby = 'name';
    $title = '';
    $show_count = 0;
    $hierarchical = 0;
    $hide_empty = 0;
    $use_desc_for_title = 0;
    $port_args = array (
      'taxonomy' => $taxonomy,
      'orderby' => $orderby,
      'title_li' => $title,
      'show_count' => $show_count,
      'hierarchical' => $hierarchical,
      'hide_empty' => $hide_empty,
      'use_desc_for_title' => $use_desc_for_title
    );
    
    echo str_replace( 'View all posts filed under', 'View all projects filed under',wp_list_categories( $port_args ) );

    Hopefully those of you smarter than I can help me with my dilemma.

    Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by morsecodemedia
  • This topic is not resolved
  • WordPress version: 3.3.1