Custom Post Types and archives

You need to add the rewrite rules yourself. This code should work: function prefix_this_add_rewrite_rules() { // Add day archive (and pagination) add_rewrite_rule( ‘/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/?([0-9]{1,})/?’, ‘index.php?post_type=cats&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]’, ‘top’ ); add_rewrite_rule( ‘cats/([0-9]{4})/([0-9]{2})/([0-9]{2})/?’, ‘index.php?post_type=cats&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]’, ‘top’ ); // Add month archive (and pagination) add_rewrite_rule( ‘cats/([0-9]{4})/([0-9]{2})/page/?([0-9]{1,})/?’,’index.php?post_type=cats&year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘cats/([0-9]{4})/([0-9]{2})/?’, ‘index.php?post_type=cats&year=$matches[1]&monthnum=$matches[2]’, ‘top’ ); // Add year archive (and pagination) add_rewrite_rule( ‘cats/([0-9]{4})/page/?([0-9]{1,})/?’, ‘index.php?post_type=cats&year=$matches[1]&paged=$matches[2]’, … Read more

Custom post type archive page pagination

Shouldn’t it be like this? ‘paged’ => (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1 And next_posts_link/previous_posts_links has these arguments: next_posts_link( $label , $max_pages ); $label is not a string in your code but a kind of an array? I am not so familiar with these “magical PHP functions”, but what do you suppose these “__” to do? … Read more

Skip first post on Category Archive

Have a look at the WordPress Documentation available here, you’ll be able to do what you want to do by using two hooks: https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination Unfortunately, many developers find out that hard way that setting an offset value in their custom WordPress queries has the nasty and potentially serious side-effect of breaking pagination. There is a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)