Archive Issue
-
Hi,
I’m having a small issue with the Archive pages of CPT-onomies.
I have created a CPT-onomy called “Actors”. When I go to https://mysite/actors/ I got a page showing “Archive: Actors” which nicely lists all actors I’ve added to the dbase already. This works fine. However, when I then click on an actor, I get all posts I’ve already created, not only those linked to the CPT-onomy of that specific actor.
I’ve added following code to my functions.php:
add_action( ‘init’, ‘my_website_add_rewrite_rule’ );
function my_website_add_rewrite_rule() {add_rewrite_rule( ‘actors/([^/]+)/?$’, ‘index.php?post_type=actors=$matches[1]&cpt_onomy_archive=1’, ‘top’ );
}
Of course, after adding this to my functions.php I flushed the rewrite rules as stated on the documentation page.
Another strange thing: when going to /actors, it clearly lists this as an archive (it states on top of the page “Archive: Actors”) but on an individual actor’s page, it doesn’t show a heading, just the list of posts…
Anyone any ideas? Thanks in advance!
- The topic ‘Archive Issue’ is closed to new replies.