Post-Archive like a page in a specific subdirectory
You can register a custom post type with a custom slug permalink structure. $args = array( ‘rewrite’ => array( ‘slug’ => ‘our-work/book’ ), ); register_post_type( ‘projects’, $args );
You can register a custom post type with a custom slug permalink structure. $args = array( ‘rewrite’ => array( ‘slug’ => ‘our-work/book’ ), ); register_post_type( ‘projects’, $args );
I’m with s_ha_dum that this isn’t very clear on what’s happening, but have you tried wp_reset_postdata()? I believe you would put it before the last while loop in your example above. Here’s an article on other methods of resetting the query if that’s not working: http://digwp.com/2011/09/3-ways-to-reset-the-wordpress-loop/
There is no child_of argument for wp_get_archives(). How, or why, did you expect that to work? You are attempting to use arguments that don’t exist. That, I suppose, is the answer to the question. The function is ignoring child_of because the argument doesn’t exist. There are a number of filters in wp_get_archives() such as getarchives_where … Read more
When you set up a static page as home page, you can set up also a page for the blog archive. If you do that, you don’t need to alter the WP_Query in the blog page template, you only need to work with The loop like in a archive template file. When the page for … Read more
Your entry.php template is completely wrong. This should be your loop so to speak. Yet this is more like a page template, that also calls for entry.php. This template should include the call to your the_content(), media files, comments if applicable, and the title, also all other things you might want to include in your … Read more
Let’s start with term archive concept and works backwards. It is easy for human to grasp it — it’s an archive with posts having particular term. On a more technical level though — it’s a combination of query variables, which “tells” WordPress it is such archive. So if we dump query variables there will be … Read more
If i am not wrong then i think you are talking about this Blankslate theme. If this is the case then you can edit the older and newer links displayed on archive page by editing the following code by overwriting the theme file nav-below.php in the child theme. <div class=”nav-previous”><?php next_posts_link(sprintf( __( ‘%s older’, ‘blankslate’ … Read more
Never use query_posts, use pre_get_posts to modify any main query. function wpd_exclude_author_category( $query ) { if ( $query->is_author() && $query->is_main_query() ) { $query->set( ‘category__not_in’, array( 42 ) ); } } add_action( ‘pre_get_posts’, ‘wpd_exclude_author_category’ );
First of all, is_archive() does not accept any parameters if you have read the codex, that is why it will always return true no matter what you tried on any archive page As pointed out is_post_type_archive( $post_types ) is the proper conditional tag to use to check for a specific post type archive page. One … Read more
The main query that runs on archive pages are quite specific to archive pages, and this query is not replicated with a default custom query. As your code stands, your query will retrieve posts according to published date, ie from newest to oldest, and not according to archive. THE PROBLEM There are a couple of … Read more