Warning when using the wpp_get_mostpopular() template tag
-
Warning: htmlspecialchars(): charset `ANSI_X3.4-1968′ not supported, assuming utf-8 in /xxx/xxx/public_html/wp-content/plugins/wordpress-popular-posts/wordpress-popular-posts.php on line 3383
my code:
<?php global $post; $postcat = get_the_category( $post->ID ); $args=array( 'cat' => $postcat[0]->term_id, // this is category ID 'orderby' => 'views', 'stats_views' => 1, 'limit' => 9, 'order' => ASC, 'range' => 'weekly', 'freshness' => 1, 'post_type' => 'post', 'title_length' => 25 ); wpp_get_mostpopular( $args ); ?>
i try this code from suport
// Get post data global $wp_query; $queried_object = $wp_query->get_queried_object(); // Get post categories $categories = get_the_category( $queried_object->ID ); // WPP paremeters $args = array( 'range' => 'monthly', 'limit' => 10, 'post_type' => 'post' ); // Post has at least one category assigned, // so let's use its ID to list the most popular // from that category if ( !empty( $categories ) ) { $args['cat'] = $categories[0]->term_id; } // Display popular posts list wpp_get_mostpopular( $args );
but still warning
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Warning when using the wpp_get_mostpopular() template tag’ is closed to new replies.