Slug for custom post type archive

Nothing appears to be incorrect – (and I assumed you’ve gone to saved your permalink structure to flush the rewrite rules as the comments suggest? 🙂 ). I would recommend using this plug-in to determine problems with your url-redirection: http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/ – update your question with your findings and someone may be able to offer a … Read more

How to achieve this permalink -> category-name/custom-post-type-name/post-name

You have to filter ‘post_type_link’ to create the appropriate permalink. See this answer for a similar example. The following code works: add_action( ‘init’, array ( ‘WPSE_63343’, ‘init’ ) ); class WPSE_63343 { protected $post_type=”video”; public static function init() { new self; } public function __construct() { $args = array ( ‘public’ => TRUE, ‘rewrite’ => … Read more

Date archives for custom post type

What you want can be done also filtering ‘month_link’ for monthly archives, ‘year_link’ for yearly archives and ‘day_link’ for daily archives. You can also write a function that extends wp_get_archives to work with CPTs, adding filters to ‘getarchives_where’ and to the archive link. function wp_get_cpt_archives( $cpt=”post”, $args = array() ) { // if cpt is … Read more

How to filter post data with AJAX on page?

As you guess that’s what happening(at least I think). You should separate your ajax logic from your “first load” logic. You can make a function ie my_get_posts that will be called inside archive-work.php and then inside ajax_filter_get_posts you can call the my_get_posts() function. archive-work.php <div class=”work-results”> <?php $res = my_get_posts(); echo $res[‘response’]; ?> </div> functions.php … Read more