The first section of this question have been answered before. Basically, there are no index pages for archives, and there never will be. For a complete explanation, feel free to check this post I have recently done on this subject.
Why did wordpress think that is
post_name
and post type ispost
?
You might or might not know this, but WordPress uses WP_Query
to run the main query, the only difference with a new instance of WP_Query
is is that with a new instance the argument values are set by the user while the main query uses the URL to set this arguments and values
OK, so what really happens here? When any link is clicked or any URL is typed into the address bar, WordPress executes the main query. The arguments and values passed to WP_Query
is determined by the URL. WordPress parses the URL, match rewrite rules and breaks the URL up into values that is passed as query arguments.
If you have /%postname%/
set as your permalink structure, the URL of a post looks like this
mysite.com/name-of-my-post/
So, if you directly enters the taxonomy name into the URL, it looks like this
mysite.com/ifcc-categories/
As you can see, these two URL’s are exactly the same structure, and that is how WordPress reads it. You have to remember, the main query uses rewrite rules to match the URL against, and in this example, it matches normal posts. This is why you see the SQL query in your question
The main query defaults to post
post type on all pages accept on custom post type archive pages, normal pages (in which case the post type will be page
) and taxonomy pages.
Because you don’t have a post (or page for that matter) that has the name ifcc-categories
, a 404 is returned. The main query is never stopped if something is not found, even if invalid values are set to start with to the arguments (which in any case the main query will not know), it simply carries on executing and finishes what it started of, even on 404 pages. It is like dropping a ball. That ball can’t decide to stop mid-air because there is no one to catch it. It can only stop when its finished falling
TO CONCLUDE
If you need to have an index page for a specific term, category or taxonomy, you will need to create a page with the desired custom query and name your slug accordingly, so that if you visit
mysite.com/ifcc-categories
you will be served with the index page you’ve created