WordPress.org

Ready to get started?Download WordPress

Forums

Category.php to only display posts assigned a term from a custom taxonomy (2 posts)

  1. Henry
    Member
    Posted 2 years ago #

    My category.php template currently displays all posts that have been filled under a particular category.

    For example, example.com/catgeory/football displays all posts that have been assigned to the category "football".

    I would like category.php to only display posts that are in a particular category "e.g football" AND have been assigined a particular term from a custom taxonomy.

    Any ideas how I could do this?

  2. Henry
    Member
    Posted 2 years ago #

    I was able to do this with

    $args = array(
    	'post_type'=> 'post',
    	'sports'    => 'football'
    );

Topic Closed

This topic has been closed to new replies.

About this Topic