How to Add Wrapper to Infinite Scroll Javascript?
You would control the markup by editing archive.php. Here you can add a wrapper to individual posts.
You would control the markup by editing archive.php. Here you can add a wrapper to individual posts.
Use a new query outside the loop like this one $query = new WP_Query( ‘category_name=ben affleck;post_type=post’ ); if ( $query->have_posts() ) : while $query->have_posts() : $query->the_post(); // Loop output goes here endwhile; endif;
Page Templates Used in Custom Post Type
Don’t name your custom page template archive.php. If you refer to the Template Hierarchy, you’ll see that archive.php is the template WordPress loads for archives if a more specific template isn’t available.
You should call your file taxonomy-interview_category.php to be automatically associated with your custom taxonomy. If you want it to look like interview archive, you can just include archive-interview.php in your newly created taxonomy-interview_category.php. I suggest you have a look at this image that explains WordPress template hierarchy and logic: http://codex.wordpress.org/images/9/96/wp-template-hierarchy.jpg
Permalink Rewrite with Archive – Archive gets 404
I added this to my child-theme’s functions.php file and it works 100% add_action( ‘template_redirect’, ‘redirect_archive’ ); function redirect_archive() { if ( is_tax(‘location’) ) { $termurl = get_query_var( ‘term’ ); wp_redirect( home_url(‘/search/location/’.$termurl), 301 ); exit; } }
How to set number of posts to display in archive
Modify category archive page loop on functions.php
get_queried_object_ID() will return the ID on the page for posts, or get_queried_object() will return the page object containing all its post fields. Alternately, the ID of the blog page is stored in the option page_for_posts, which is internally how get_queried_object gets the ID of the post object to load.