I want my yearly archives to show a list of all posts

if you only want this for yearly archives, then you could create a custom date.php template that limits the posts to displaying just the title (and possibly excerpt as you wish) http://codex.wordpress.org/images/1/18/Template_Hierarchy.png otherwise, you could also create archive.php but it that would effect all your archives. date.php would only apply to your time-based archives. then … Read more

Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard

You named the custom post type ‘custom_about_post’ not ‘about’. Rename the archive template to archive-custom_about_post.php or better: rename the post type. As a rule of thumb: Avoid underscores in post type names. There are/were some issues, especially with templates. And why do you need a custom post type just for about pages? What’s your goal?

How can I use “getarchives_where” to get monthly archives for static pages?

wp_get_archives already have post_type=”post” by default and to replace it try this: add_filter(‘getarchives_where’,’my_archives_filter’); function my_archives_filter($where_clause) { str_replace( “post_type=”post”” , “post_type=”page”” , $where ); } in sidebar: add_filter(‘getarchives_where’,’my_archives_filter’); wp_get_archives(‘type=yearly’); remove_filter (‘getarchives_where’,’my_archives_filter’);

/tag/tag_name/page/2 gives a 404 error

The current page number is set by the main query, not by your embedded sub-query. Also, you really should not create a second query, alter the main query instead with a filter on pre_get_posts. add_filter( ‘pre_get_posts’, ‘add_custom_type_to_tag_archive’ ); function add_custom_type_to_tag_archive( $query ) { if ( ! is_main_query() or ! is_tag() ) return $query; $query->set( ‘post_type’, … Read more

Archive not sorting correctly

Have a look at the orderby parameters for WP_Query to see all of the valid values that can be. If wpcf-start-time is a meta key, then orderby should be meta_value, which will also require you set a meta_key argument to tell WP what meta key you want to order on- } elseif ($q->is_post_type_archive(‘cif-events’)) { $q->set(‘orderby’, … Read more

Use one template only for custom post type archives?

add_filter( ‘template_include’, ‘wpsites_cpt_archive_page_template’, 99 ); function wpsites_cpt_archive_page_template( $template ) { if ( is_post_type_archive() ) { $new_template = locate_template( array( ‘your-cpt-template.php’ ) ); if ( ” != $new_template ) { return $new_template ; } } return $template; } Try this in your functions file. You can add your post types to this line like this: if … Read more

Archiving posts in wordpress

You can do that with two ways. 1. You can modify the WordPress main query to force WordPress to show posts older than 30 days on archive pages and on blog page, show posts before 30 days. You can limit posts with the help of date_query. Paste this function in your functions.php file. This should … Read more

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