How to hide the year in archive link

You could use a regexp to remove the year, though it’s a little hacky: $string = wp_get_archives(‘type=monthly&limit=20&echo=0’); $pattern = ‘ ((19|20)\d{2}(</a>))’; echo preg_replace($pattern, ‘\\3’, $string); Answer from this stackoverflow question: https://stackoverflow.com/questions/5759720/have-wp-get-archives-return-a-string-with-no-year-in-it

date.php shows only three posts’ title. how to fix it?

Use the pre_get_posts action to modify number of posts per page on date archives. This would go in your theme’s functions.php file: function wpa_date_posts_per_page( $query ) { if ( !is_admin() && $query->is_date() && $query->is_main_query() ) { $query->set( ‘posts_per_page’, -1 ); } } add_action( ‘pre_get_posts’, ‘wpa_date_posts_per_page’ );

Display future posts in archive

You need to use “OR” instead of “AND”, <?php // Get years that have posts $years = $wpdb->get_results( “SELECT YEAR(post_date) AS year FROM wp_posts WHERE post_type=”post” AND (post_status=”publish” or post_status=”future”) GROUP BY year DESC” ); // For each year, do the following foreach ( $years as $year ) { // Get all posts for the … Read more

Missing content on author archive page

Fixed. I used code: <div class=”panel callout radius”> <?php echo get_avatar( get_the_author_meta( ‘user_email’ ), ’96’ ); ?> <div class=”right”> <a href=”https://twitter.com/<?php the_author_meta( ‘twitter’ ); ?>” target=”_blank”><i class=”fi-social-twitter size-24″></i></a>&nbsp; <a href=”<?php the_author_meta( ‘facebook’ ); ?>” target=”_blank”><i class=”fi-social-facebook size-24″></i></a>&nbsp; <a href=”mailto:<?php the_author_meta( ’email’ ); ?>”><i class=”fi-mail size-24″></i></a> Then I found out this function could only be used … Read more

Archive – Show Video from First Post

I have created a working solution to this. I wrapped the JavaScript in a DIV. All other content is automatically wrapped in paragraph tags. In archive.php, I have it pull the most recent post in the section where I want the video. In the CSS, I have set display:none to the paragraph tags. Thanks everyone!

Display Day names with wp_get_archives instead of date

There are no arguments you can pass to do this, and no obvious filters. However, if you dig through the source you will see: 1426 if ( ! $archive_date_format_over_ride ) { 1427 $archive_day_date_format = get_option( ‘date_format’ ); 1428 $archive_week_start_date_format = get_option( ‘date_format’ ); 1429 $archive_week_end_date_format = get_option( ‘date_format’ ); 1430 } That value is used … Read more

Archives widget doesn’t work?

You most probably have a plugin that either uses query_posts, are have a bad filter and/or query that is altering the the main query object ($wp_query) as you have this issue across all themes that you have tested. You should deactivate your plugins one by one and check which one/s are causing the issue. Also, … Read more