Query Posts Incorrectly Displaying Tags Archives
create a tag.php template from a copy of archive.php or category.php, and remove the ‘query_posts’ line from the code.
create a tag.php template from a copy of archive.php or category.php, and remove the ‘query_posts’ line from the code.
Something like this http://wordpress.org/extend/plugins/image-archives/ ?
The query_posts function documentation does give an example on how to filter by time as well. Albeit, small and out of context. The WP_Query documentation give much more information, including on Time Parameters that it accepts. query_posts is just a wrapper to methods provided by the global instance of the WP_Query class. So, the correct … Read more
to accomplish that, this what I did for my blog: (1) create a page template, say “masterarcive” (2) add the code in that page. (3) this code also include pagination Here is my entire page template with the complete code I use in it: <?php /** * @package WordPress * @subpackage Default_Theme */ /* Template … Read more
Had similar situation not long ago. Check the answer to my question here. I believe that will solve your problem.
They’re not ‘bad pages’ (404), they’re empty archives. Make sure you have published posts in the ‘uncategorized’ category, since I don’t actually see any in the sidebar list.
You could use this: <a href=”https://wordpress.stackexchange.com/questions/54419/<?php echo home_url() .”/author/’ . get_the_author_meta( ‘user_login’, wp_get_current_user()->ID ); ?>” >My Posts</a>
You can try using the tag cloud.
This is probably what you need: <?php if (is_category()) { // Show only on Category archive pages ?> <h1><?php echo single_cat_title(‘News: ‘); ?></h1> <?php } elseif (is_tag()) { // Show only on Tag archive pages ?> <h1><?php echo single_tag_title(‘News: ‘); ?></h1> <?php } ?> OR like this (as @StephenHarris pointed out): <h1><?php if ( is_category() … Read more
Yes, it’s possible. Use custom query variables, declare rewrite rules to organize permalinks. For example, one can rewrite this URI: /movies/bruce-willis/2011 to this one: /index.php?post-type=movies&actor_tax=bruce-willis&requested_year=2011 (using WP_Rewrite) You need to “declare” your own “query variables” and use them in your own archive template.