Custom Post Archive – display page 1 differently then subsequent pages

It sounds possible. Archive pages have a built in query they execute if you want to filter you can create a template for just that category such as archive-{category}.php or if your going to filter more information like described you should use. add_action( ‘pre_get_posts’, ‘my_change_sort_order’); function my_change_sort_order($query){ if(is_archive()): //Set the order ASC or DESC $query->set( … Read more

How to display archive page posts based on author_id

All you need is to use pre_get_posts action to hook to add author_id to the query based on your custom custom_user_id query var: add_action( ‘pre_get_posts’, ‘filter_by_custom_user_id’ ); function filter_by_custom_user_id( $query ) { // Apply only on frontend, for gallery post type archive, for main query and if custom_user_id query var is set. if( ! is_admin() … Read more

Archive Custom Post Type

@DarrenLee, to add multiple post types on your code, you just make a change on function cpt_rewrite_rules. Create an array of your post types, put function cpt_generate_date_archives inside loop. function cpt_rewrite_rules($wp_rewrite) { $post_types = array( ‘book’, ‘movie’, ‘etc’ ); //create post_types array $rules = array(); foreach( $post_types as $post_type ) { /* generate date archives … Read more

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