Bumping a (tagged) post to the top of 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

How can I create a master archive?

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

Display an archives name

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

Advanced archive url structure (category, tag and date)

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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)