Echo there are no posts wp_get_archives

You may be able to use get_archives_link with same parameters as wp_get_archives and either use the output from that to determine if there are no posts or there is a filter in get_archives_link called get_archives_link that gives you access to the HTML. Source: http://wpseek.com/function/get_archives_link/

Adding a Meta to the wp_get_archives

1) You need to include postmeta into query that you’re using for archive pages in a kind of this way: add_filter(‘getarchives_join’, ‘my_archives_join_filter’); function my_archives_join_filter($join) { if (!is_user_logged_in()) { global $wpdb; return $join . “LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id)”; } return $join; } 2) You need to include condition to select a post with … Read more

Active class with custom wp_get_archives HTML output

I haven’t found an easy way but here is a solution: I get the month and year from the current archive and compare them with the text. $year = get_query_var( ‘year’ ); $monthnum = get_query_var( ‘monthnum’ ); $monthname = $GLOBALS[‘wp_locale’]->get_month( $monthnum ); $date = $monthname . ‘ ‘ . $year; if ( $text === $date … Read more

wp_get_archives() output

The date.php, archive.php, and index.php files control the date archive output. You need to check the contents of those files, in respective order, to find the problem. If WordPress can’t find date.php, it will check for archive.php, and load that if found. Otherwise, index.php will be used to display date archives. See my answer on … Read more