Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function custom_pvc_counter_function( $arguments ) {
- $arguments = shortcode_atts( array(
- 'number' => '10',
- 'post_type' => array('post', 'page'),
- 'order' => 'DESC',
- ), $arguments );
- $defaults = array(
- 'number_of_posts' => $arguments['number'],
- 'post_type' => $arguments['post_type'],
- 'order' => $arguments['order'],
- 'thumbnail_size' => 'thumbnail',
- 'show_post_views' => true,
- 'show_post_thumbnail' => false,
- 'show_post_excerpt' => false,
- 'no_posts_message' => __( 'No Posts', 'post-views-counter' ),
- 'item_before' => '',
- 'item_after' => ''
- );
- return pvc_most_viewed_posts( $defaults );
- }
- add_shortcode( 'custom-post-views', 'custom_pvc_counter_function' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement