Integer based rewrite isn’t recognized for value of 1

Rewrite rules in WordPress should point to index.php, and to substitute a matched value (number from address) to URL parameter (item_id) you must use $matches[1] instead of $1. So your rule should look like this: add_rewrite_rule(‘^add-item/([0-9]+)/?’, ‘index.php?item_id=$matches[1]’, ‘top’); You usually need to complete the rule with information about what is displayed. For display: single post … Read more

Query Vars Not Set in Main Query

Query vars are… fun like that. Depending on which archive you are messing with get_post_type() just might be simple enough to do it (it gets type from actual post, not query). Otherwise you might want to go for get_queried_object() to figure out what precisely you are dealing with.

How to: wordpress job listing and candidates details

You say that the listing is a custom post type so each job listing has a post ID so you can just pass that to your uploadcv.php in your Apply Now Button : <a href=”https://wordpress.stackexchange.com/questions/22457/.uploadcv.php?listing_id=<?php echo $post->ID; ?>”>Apply Now</a> and then retrieve that in your uploadcv.php : $listing_ID = (int)$_GET[‘listing_id’]; Now as far as saving … Read more