Tag Info

New answers tagged

0

It sounds like you're very close here and your only remaining issue is that your permalinks for genres and movies collide. 'movies' CPT permalink /genres/%custom field meta box value%/%movie%/ 'genres' CPT permalink /genres/%genre%/ The issue here is using the add_permastruct. When it creates the rules for movies, they look something like this: ...


1

I think you're taking the wrong approach in terms of data structure. You should create a custom taxonomy called Genres, and bind your movies CPT to the Genres custom taxonomy, and then select which Genres the movie belongs to. To address questions about your existing code. single-XXX.php template is used to display content from the CPT called XXX. So in ...


1

I would say you need to add the following rewrite rule in your foreach loop: add_rewrite_rule('^'.$pt_slug.'/category/(.+?)/page/?([0-9]{1,})/?','index.php?post_type='.$post_type.'&category_name=$matches[1]&paged=$matches[2]','top');


0

You would need to create a custom rewrite rule that maps not just the post slug but also the cid value, see this article: http://www.prodeveloper.org/create-your-own-rewrite-rules-in-wordpress.html And the relevant Codex documentation: http://codex.wordpress.org/Rewrite_API http://codex.wordpress.org/Rewrite_API/add_rewrite_rule I'm assuming you don't ...



Top 50 recent answers are included