• Hey,

    I have 2 custom post types: Companies and News
    Both custom post types have a Taxonomy Region.
    There is a link that show only Companies (without news) from a certain Region term?
    domain.com/companies -> link for custom post type Companies
    domain.com/region/bucharest -> link for “bucharest” term of custom taxonomy Region.

    I want to see like that:
    domain.com/companies/region/bucharest

Viewing 3 replies - 1 through 3 (of 3 total)
  • You have to create that yourself in a template – a custom loop that obeys your commands. The sample code is as follows:

    $loop = new WP_Query( array(
    			'post_type' => 'companies',
    			'cat' => 'region',
    			'order' => 'DESC')
    	);
    Thread Starter gomymusic

    (@gomymusic)

    Thanks.
    But I want to make possible without creating template page, I want to create a function that make possible a custom link to show these filter.

    Thanks.

    Thread Starter gomymusic

    (@gomymusic)

    I found the solution:

    domain.com/region/bucharest?post_type=companies

    This is the link.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show only one custom post type of a taxonomy that have more custom post types.’ is closed to new replies.