• Resolved melinjo

    (@melinjo)


    I got this error in my php error log

    Fatal error: Uncaught Error: Call to undefined function wpp_get_mostpopular()?in?/home/kanalind/public_html/wp-content/themes/kobaran-v2.1/single.php:183

    Stack Trace

    1.include()/home/kanalind/public_html/wp-includes/template-loader.php:1062.require_once(‘/home/kanalind/…’)/home/kanalind/public_html/wp-blog-header.php:193.require(‘/home/kanalind/…’)/home/kanalind/public_html/index.php:174.{main}thrown in?/home/kanalind/public_html/wp-content/themes/kobaran-v2.1/single.php on line 183

    And this is my script in single.php

    	<?php
    $categories = get_the_category();
    $category_id = $categories[0]->cat_ID;
    $args = array(
        'cat' => $category_id,
    	     'range' => 'last30days',
    	'limit' => 5,
    	  'thumbnail_width' => 85,
        'thumbnail_height' => 85,
    	'stats_date' => 1,
    	  'stats_date_format' => 'j F Y',
    	 'stats_category' => 1, 
    	  'post_html' => '<li>{thumb} {title} <div class="wpp-stats-custom"></div><p class="wpp-date-custom"> {date} </p></li>'
    );
    
    					  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 @melinjo,

    Please make sure that the WordPress Popular Posts plugin is installed and active on your website, otherwise you’ll get that error message.

    Thread Starter melinjo

    (@melinjo)

    yes, it’s already installed and activated. Try to view source my website kanalindonesia.com, you will see wpp script and css are there.

    Plugin Author Hector Cabrera

    (@hcabrera)

    That’s odd. The function being undefined could mean that either you’re trying to call it before the plugin has been loaded by WordPress (unlikely but double check your code) or that WPP’s plugin files have been corrupted/deleted somehow.

    Try reinstalling the plugin manually (you can dowload the latest version from here) and see if that fixes the problem. If not you may need to reach out to the people who maintain your website or hire a freelance developer to have them assist you with this issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error: Uncaught Error: Call to undefined function’ is closed to new replies.