Archive subtitles for different types of archives

How about using the single_cat_title() function regardless of what type of archive it is? For example: function get_the_subtitle() { if( is_archive() ) { $subtitle=”Blog posts for “; } if( is_category() || is_tag() ) { $subtitle .= single_cat_title( ”, false ); } if( is_author() ) { $curauth = ( get_query_var( ‘author_name’ ) ) ? get_user_by( ‘slug’, … Read more

Archive template limiting to 4 entries?

This has nothing to do with the loop in the template file. Check Settings>>Reading>>”Blog pages show at most…” That setting is the default setting for Archives, too, as well as Search results, etc. Use WordPress › Custom Post Limits « WordPress Plugins to vary posts limits in categories, archives, etc.

Archive page showing wrong month

Try adding the following above the first if statement to see what actual day is being useddisplayed: echo get_the_date(); It might also help to add the following lines to help debug exactly what the query is doing: global $wp_query; var_dump($wp_query); The code is correct – so it has to be something else affecting the display. … Read more

Change permalink structure for pagination only

You could filter get_pagenum_link. The parameter has to be paged, not page then. add_filter( ‘get_pagenum_link’, ‘wpse_78546_pagenum_link’ ); function wpse_78546_pagenum_link( $link ) { return preg_replace( ‘~/page/(\d+)/?~’, ‘?paged=\1’, $link ); } But I would rather try to fix the broken rewrite rules.

How do I remove a category from a wordpress loop>

You can add category id or category slug into arguments you are passing to query_posts: <?php // category slug (‘products’) query_posts(array( ‘post_type’ => ‘post’, ‘showposts’ => 5, ‘category_name’ => ‘products’ ) ); ?> or <?php // category id (‘3’) query_posts(array( ‘post_type’ => ‘post’, ‘showposts’ => 5, ‘cat’ => ‘3’ ) ); ?> In the second … Read more

Custom Post Type archive

When you’re viewing a Custom Post Type Archive, your archive-documents.php template will be used. In your case this is the URL /documents/. When you’re viewing a taxonomy term, you’re viewing a Custom Taxonomy Archive, not a Custom Post Type Archive. If you haven’t created one specific to your taxonomy, then archive.php (or index.php, if archive.php … Read more

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