Pagination not working with pagenavi

I added the following to my functions.php file and it worked: function toolset_fix_custom_posts_per_page( $query_string ){ if( is_admin() || ! is_array( $query_string ) ) return $query_string; $post_types_to_fix = array( array( ‘post_type’ => ‘news_article’, ‘posts_per_page’ => 6 ), // add another if you want /* array( ‘post_type’ => ‘movie’, ‘posts_per_page’ => 2 ), */ ); foreach( $post_types_to_fix … Read more

EventON – Dequeue Styles

TL;DR This is the answer: add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_style( ‘evo_font_icons’); wp_deregister_style( ‘evo_font_icons’); wp_dequeue_style( ‘evcal_cal_default’); wp_deregister_style( ‘evcal_cal_default’); wp_dequeue_style( ‘evo_single_event’); wp_deregister_style( ‘evo_single_event’); wp_dequeue_style( ‘evcal_addon_styles’); wp_deregister_style( ‘evcal_addon_styles’); wp_dequeue_style( ‘evo_addon_styles’); wp_deregister_style( ‘evo_addon_styles’); wp_dequeue_style( ‘evo_fc_styles’); wp_deregister_style( ‘evo_fc_styles’); wp_dequeue_style( ‘eventon_dynamic_styles’); wp_deregister_style( ‘eventon_dynamic_styles’); wp_dequeue_style( ‘evo_TX_styles’); wp_deregister_style( ‘evo_TX_styles’); }, 20); Explanation First of all: eventON is a pain to override styles with. … Read more

How to get the total count of Favorite/Favorited authors

This will help you to show how many author current user favorite others: Add this to your themes functions.php file <?php function get_fav_auth_count(){ if ( is_user_logged_in() ) { global $current_user; wp_get_current_user(); $count = size_of(get_user_option(‘favorite-authors’, $current_user->ID)); echo $count; } } ?> and call it like this <?php get_fav_auth_count(); ?>