Hi @tom2,
All you need to do is pass your custom post type to the post_type parameter, like this for example:
<?php
$args = array(
'post_type' => 'post, page, your-custom-post-type-here' // comma separated
);
wpp_get_mostpopular($args);
?>
I would like to add thumbnail and manual title, but it shows what comes in the plug-in ‘<ul class = “wpp-list”>’, if you want to send my site, I don’t know much about PHP. Pardon my English.
<?php
$args = array(
'post_type' => 'post, page, <div class="img" style="background-image:url(<?php echo get_the_post_thumbnail_url( $post_id, 'large' ); ?>);"> </div>' // comma separated
);
wpp_get_mostpopular($args);
?>
Alright, try this:
<?php
$args = array(
'limit' => 10,
'range' => 'last24hours',
'post_type' => 'your-custom-post-type-here',
'thumbnail_width' => 100,
'thumbnail_height' = 100,
'post_html' => '<div class="img" style="background-image:url({thumb_url});">Your Custom Title Here (eg. {text_title})</div>'
);
wpp_get_mostpopular($args);
?>
Things you need to change:
- The width & height of the background image (see thumbnail_width and thumbnail_height).
- The name of your custom post type (see post_type).
- The actual HTML structure of each of your popular posts (see post_html)
Friendly advice: you should consider spending some more time learning PHP and WordPress Development in general if you want to code stuff on your own. Alternatively, hiring a more experience developer is also an option if you don’t have time to learn (eg. you have a deadline ahead.)