Show author bio box

Try this one : <?php $authordesc = get_the_author_meta( ‘description’ ); if ( ! empty ( $authordesc ) ){ ?> <div class=”blog-article-author”> //author info here… </div> <?php } ?>

Pagination not working on my archive page for a custom post type

So I got this to work by adding this function to functions.php // Custom query for events function set_posts_per_page_for_events_cpt( $query ) { if ( !is_admin() && $query->is_main_query() && is_post_type_archive( ‘events’ ) ) { // set date $currentdate = date(“Y-m-d”,mktime(0,0,0,date(“m”),date(“d”),date(“Y”))); $meta_query = array( array( ‘key’=>’event_date’, ‘compare’ => ‘>=’, ‘value’=> $currentdate, ‘type’ => ‘DATE’, ), ); $query->set(‘meta_query’, … Read more

Work and Display a Custom Post Type as a normal Post

Ok, so I think you could apply the codex example as is: function search_filter($query) { if ( !is_admin() && $query->is_main_query() ) { if ($query->is_search) { $query->set(‘post_type’, array( ‘post’, ‘actualizacion’, ‘notificacion’ ) ); } } } add_action(‘pre_get_posts’,’search_filter’); I think you were just missing the !is_admin() check in there… Hope this helps!

Change post count on tag/terms pages to 10

You’re almost there my friend. Just check with $query->is_tag() rather than only is_tag(). So your updated code will be- function main_query_mods( $query ) { // check http://codex.wordpress.org/Conditional_Tags to play with other queries if(!$query->is_main_query()) { return; } if($query->is_tag()) { $query->set(‘posts_per_page’,10); } } add_action( ‘pre_get_posts’, ‘main_query_mods’ );