Page 2+ of taxonomy archives does not recognise sort-order from dropdown
Page 2+ of taxonomy archives does not recognise sort-order from dropdown
Page 2+ of taxonomy archives does not recognise sort-order from dropdown
Archive sorted by month – separate
archive.php can’t find categorized posts
You could use template_redirect hook to redirect your pages, like this: function my_page_template_redirect() { global $wp_query; $object = $wp_query->get_queried_object(); //this returns queried object. Check the conditions and redirect } add_action(‘template_redirect’, ‘my_page_template_redirect’);
Keep same archive.php for post from archive?
Alright, I solved it: I queried the year and month of the page we’re on with: $year = get_query_var(‘year’); $monthnum = get_query_var(‘monthnum’); And then I added date parameters to each WP_Query: $col1 = new WP_Query( array( ‘year’ => $year, ‘monthnum’ => $monthnum, ‘posts_per_page’ => 1, ‘cat’ => 31 ) ); This allows me to split … Read more
The problem was that the files wasn’t attached to the post. To make it work I re-attached the files (Media Library > Attach). I also removed the & in $attachments =& get_children( array (.
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.
A simple way to do is to edit your theme’s “search.php” (copying it from the parent theme into your child theme’s directory first if you’re using a child theme) and then before the posts loop putting something like: <?php if ( $tag = get_term_by( ‘name’, get_search_query(), ‘post_tag’ ) ) { ?> <article><!– or whatever is … Read more
Site loads very slow for archive custom post type page