CPTs relationship
CPTs relationship
CPTs relationship
Website URL Permalinks
Try add_rewrite_rule(), here’s tutorial on how to use it https://www.pmg.com/blog/a-mostly-complete-guide-to-the-wordpress-rewrite-api/
Yes, it’s possible, but think about what WebElaine wrote in comment. You’ll need a query variable (e.g. jobname) to store the name of jobs custom post type. You also need a rewrite rule that interprets /jobs/{post-slug}/contact address as a “contact” page and keep {post-slug} in query variable jobname. add_filter( ‘query_vars’, ‘se354723_query_vars’ ); add_action( ‘init’, ‘se354723_rewrite_job_contact’ … Read more
Rewrite dynamic URLs as pretty URLs in WordPress functions.php (add_rewrite_rule) – what’s wrong with my code?
I’ve fixed it with the following code: /** * Redirect ‘/tag/[0-9]/{tag_name}/’ to the correct tag. */ add_filter(‘request’, function($qv) { if (array_key_exists(‘category_name’, $qv) && preg_match(‘/(tag\/)([0-9]*)/’, $qv[‘category_name’])) { $qv = [ ‘tag’ => $qv[‘name’] ]; } return $qv; }); I’m not sure if this is the right way, but it works!
I don’t know what nepal is (text prefix only or maybe taxonomy term), but it is not the most important thing, you will correct it if necessary. Rewrite rule like this should resolve the case. add_action( ‘init’, ‘se356109_events_custom_rule’ ); function se356109_events_custom_rule() { add_rewrite_rule( ‘nepal/events/(.+?)/([0-9\-]+)(:?/page/?([0-9]+))?/?$’, ‘index.php?events=$matches[1]&paged=$matches[3]’, ‘top’ ); } If you need to use URL date … Read more
How can I add a vanity URL for admin-ajax.php Calls?
Translatepress taxonomy and custom post type root FIX
How to structure all custom-taxonomy with three verbs(a,b,c) and route them accordingly?