All tag/category/custom taxonomy archives 404
Well, I don’t think there’s a default page or template that lists all tags so you’d have to create one. Did you try creating a page with a “tags” slug and assigning it a template ?
Well, I don’t think there’s a default page or template that lists all tags so you’d have to create one. Did you try creating a page with a “tags” slug and assigning it a template ?
You should be able to get the next 3 posts by requesting the future status. $args = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘future’, ‘posts_per_page’ => 3, ‘orderby’ => ‘date’, ‘order’ => ‘ASC’, ); $future_posts = new WP_Query( $args ); References WP_Query parse_query() (details on the available arguments) Post Status » Future
If I try to add &posts_per_page=15 to url, it doesn’t work: it won’t change number of post. I wonder if you’re looking for a custom query variable, e.g. ppp, to change the number of posts for the main query: add_filter( ‘query_vars’, function( $vars ) { $vars[] = “ppp”; return $vars; } ); add_action( ‘pre_get_posts’, function( … Read more
Apparently setting the option publicly_queryable of the taxonomy to true, then flushing the rewrite, then updating the permalinks solved the issue. I don’t quiet understand why that’s the solution, however.
No, there are no filters for doing this. You would need to create your own version of the widgets in order to achieve this. You can find the default WordPress widgets in the following folder: /wp-includes/widgets in your WordPress installation. Simply copy the code from within the respective widget .php files in to your theme … Read more
Archive only for /year/month, not terms
How to create a completely functioning separate archive for posts from only 1 or 2 specific categories
The amazing @Krzysiek Dróżdż was right on the money on this one! I can’t believe nobody has picked it up until now. The code I was using has been shared on all sorts of well-known/well-referenced sites, as is, and NOBODY has fixed it to include is_main_query. Revised code, for anybody else who’s searching: // Add … Read more
Making the following changes to the CPT registration, and then flushing permalinks, solved the issue: Changed the rewrite slug to ‘faq’ Changed ‘has-archive’ to true instead of ‘faq’ I did #1 so that my archive page URL would still be /faq, and the side effect is that the single questions are now faq/question-name instead of … Read more
The ‘All Posts’ archive is a Blog. You choose a Blog page in Settings > Reading > Front page displays. It can either be the front page or another page. The template that page uses depends on what templates your theme has and the Template Hierarchy. home.php or index.php will likely be the template you … Read more