• Resolved kierrapalmer

    (@kierrapalmer)


    I am using the template tag wpp_get_mostpopular() to retrieve the most popular posts and put them into a carousel. For some reason, {thumb} is only showing properly when I run my site on my local environment but when I put it up on our Development server {thumb} is not returning anything, though all the other parameters work just fine. Is there any way to debug this to see what is causing this issue?

    You can see the sections mentioned at https://dev.epicsrv.com/pegdev/this-week-in-editors-choice-misty-mountains-and-long-grass-are-in/ towards the end of the page.

    Steps I have already tried to solve this, none of which helped:
    Updated WordPress and WPP plugin to latest version
    Tried disabling all the plugins that I have on the site and testing it
    Tried taking it out of a carousel and stripping it off all styles that I have on it
    Went to Settings->WPP->Tools and pressed both the Empty Cache as well as Clear all data button(since everything is just dummy data right now)
    I am able to successfully retrieve the post thumbnail using WordPress’ the_post_thumbnail()

    List of the additional plugins in use:
    Advanced Custom Fields PRO
    Contact Forms 7
    Disable Gutenberg

    Code:
    if ( function_exists(‘wpp_get_mostpopular’) ) {
    $args = array(
    ‘range’ => ‘all’,
    ‘post_type’ => ‘post’,
    ‘header’ => ‘Most Popular Posts’,
    ‘header_start’ => ‘<div class=”cell small-12 animation-element”><h4 class=”heading”>’,
    ‘header_end’ => ‘</h4></div>’,
    ‘limit’ => 8,
    ‘thumbnail_width’ => 270,
    ‘thumbnail_height’ => 180,
    ‘title_length’ => 35,
    ‘stats_author’ => 1,
    ‘stats_date’ => 1,
    ‘stats_views’ => 0,
    ‘stats_category’ => 1,
    ‘stats_date_format’ => ‘M. j, Y’,

    ‘wpp_start’ => ‘<div class=”cell small-12 no-padding-x-medium-up”><div class=”most-popular-posts animation-element fade-in reverse ripple” data-animation-delay=”2s”>’,
    ‘post_html’ => ‘<div class=”popular-post relative”> <div class=”overlay-animate ripple-element”></div>
    <div class=”thumb”>{thumb}</div>
    <div><h6 class=”title”> {title} </h6></div>
    <div class=”specs”><span>{author}</span> | <span>{taxonomy}</span> | <span>{date}</span></div>
    </div>’,
    ‘wpp_end’ => ‘</div></div>’,

    );
    wpp_get_mostpopular( $args );
    }
    ?>

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @kierrapalmer,

    That’s an environment issue.

    WPP has a check in place that verifies whether certain image-related PHP modules are available or not. If not found, then the plugin won’t attempt to create thumbnails and will return a blank string instead (hence the reason why images are being displayed correctly on your local server and not in your development server).

    That check has been in place since very early versions of the plugin and it’s probably no longer necessary. I was planning to remove it eventually and it seems now is a good chance for that.

    Try this:

    1. Go to Plugins > Editor and select WordPress Popular Posts using the dropdown at the right.
    2. Click on includes/class-wordpress-popular-posts-image.php to edit the file.
    3. Find this line and change it to $this->can_create_thumbnails = true;
    4. Click on Update File to save changes.

    Let me know how that goes, alright?

    Thread Starter kierrapalmer

    (@kierrapalmer)

    That fixed the issue, thank you. Will that be a fix that will be implemented in the next plugin update?

    Plugin Author Hector Cabrera

    (@hcabrera)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Popular Post Thumbnail only working in localhost’ is closed to new replies.