WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm quite lost with taxonomies and custom post type.

  • I have a taxonomy -> auteur
  • I have custom_post-type -> citation (quote in french).

I just want list all citations (quote) from an auteur (auteur = taxonomy) with a permalink structure like this :






( in fact the easiest way).

what are the steps to do this job (and what is the template page to modify).

share|improve this question

Don't know how did you set the post type and the taxonomy, but by default I think you're supposed to see all quotes from an author through myblogname.com/the-author-name.

If you want to place static words such auteur or citation in the link, then this is related to how you set the options for creating the post type and/or the taxonomy. (register_post_type and register_taxonomy).

Note: you can't use author (in english) because this slug already exists in WordPress (See Reserved terms).

About theme files, when you view a quotes list from an author (a taxonomy in this case), your theme uses taxonomy.php file, you can create this file if doesn't exists, see Template Hierarchy

share|improve this answer

You can try this approach:

$args = array(           
            'hierarchical' => true,
            'show_ui' => true,
            'show_admin_column' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'citation/auteur' )

When you do that you can list and filter your citations by auteurs. Just type in the address bar http://yoursite.com/citation/auteur/auter_name. But remember that the "autor_name" have to be a slug.

share|improve this answer

You can use the query below for this issue.

// WP_Query arguments
$args = array (
'post_type'              => 'my_custom_post_type',
'slug'                   => 'citation/auteur',
'post_status'            => 'publish',
'author_name'            => 'author_name',
'order'                  => 'DESC',

 // The Query
$my_query = new WP_Query( $args );

// The Loop
if ( $my_query->have_posts() ) {
while ( $my_query->have_posts() ) {
    // do something
} else {
 // no posts found

// Restore original Post Data

Please replace your post type, author name & others with default options.

share|improve this answer
There is no parameter slug for WP_Query, so not sure what you are trying to achieve here.. Besides this isn't exactly addressing the issue. – ialocin May 3 '15 at 21:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.