need help with custom archive pages/rewrites
-
Hi. this plugin is great, but i’m having trouble with the archive pages — not sure why. Here’s my situation:
1) I have these custom post types: attorney, noteworthy-case and practice-area.
2) Each has a CPTonomy that is related — you can affiliate cases to attorneys and vice versa; you can affiliate attorneys to practice areas and vice versa, and you can affiliate practice areas to cases and vice versa.
3) On my notable cases page — https://tin.abacusdesign.net/noteworthy-cases/– I want to be able to filter by a) attorney and b) practice type. Ignore practice type for now — I don’t even have the links there for that. But under ‘cases by attorney’ i have this structure, e.g.https://tin.abacusdesign.net/noteworthy-cases/attorney/jacob-sussman/
4) I have this in my functions file:
add_rewrite_rule( '^noteworthy-cases/([^/]*)/?', 'index.php?post_type=noteworthy-cases&attorney=$matches[1]&cpt_onomy_archive=1', 'top' );
5) when you hit this link:https://tin.abacusdesign.net/noteworthy-cases/attorney/jacob-sussman/ you get a 404. If i type in the url — https://tin.abacusdesign.net/?post_type=noteworthy-cases&attorney=jacob-sussman&cpt_onomy_archive=1 — it just takes me to that attorney detail page. it’s like it’s totally ignoring the rewrite rule in functions (and yes, i have `add_action( ‘init’, ‘tinfulton_rewrites’ );
function tinfulton_rewrites() { the rewrite function here;}`
Can you help? thanks!
- The topic ‘need help with custom archive pages/rewrites’ is closed to new replies.