After creating the Custom Post Type: “cpt1” but can’t list all my “cpt1’s” in a category.
Usually it is done easily by creating a category-(cpt1).php file
How can I do this in Roots?
Page shows: "Sorry, no results were found"
The searchform under the loop locate them and I can see them as single pages so I thing It must be the way Roots put them into the loop.
Please any help would be appreciated. ;(
Have you flushed your rewrite rules? If not, visit the permalink settings page and try again.
I’m testing under Mamp and found this article under “rewrite rules” search. Maybe the solution is in this article…
The link you posted has nothing to do with your error.
After registering a CPT in WordPress you need to flush the rewrite rules. If you don’t, the rewrite rules for the category pages are not created.
The other option is you haven’t enabled
has_archive when registering the CPT.
'has_archive' => true,
I dont know how to “flush the rewrite rules”
Please, could you indicate?
As I said in my first post, visit the permalink settings page. It’s in the admin dashboard. You needn’t change anything, the rules are flushed when you visit the page.