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 :
www.myblogname.com/citation/auteur_name/
or
www.myblogname.com/auteur_name/citation/
or
www.myblogname.com/auteur/auteur_name/citation/
( in fact the easiest way).
what are the steps to do this job (and what is the template page to modify).
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 HierarchyYou can try this approach:
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.
You can use the query below for this issue.
Please replace your post type, author name & others with default options.