I am new at building themes and just discovered DEBUG

I am new at building themes and just discovered DEBUG (Thanks to one of your fine articles) I am using Recent custom posts widget in my wigitised footer and am getting this warning:

Notice: WP_Query was called with an argument that is deprecated since version 3.1! "caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead. in /Applications/MAMP/htdocs/wp_corpak/wp-includes/functions.php on line 3495

I just downloaded this pluging last week. Should this be an issue? Can you please guide me through how to fix this? Thank you.

FYI my live version of this site is corpakms.net

  • eschmidtke

    Nevermind, the warning disappeared.

    The only one I have now is this:

    Warning: strpos(): Empty needle in /home/eschmidtke1/public_html/wp-content/themes/ocwc2014-foundation-master-new/functions.php on line 533

    The code is this:

    function AddCurrentMenuItemClass($classes,$item)
        $link = site_url().$_SERVER['REQUEST_URI'];
        if(strpos($link, $item->url) !== false)
            $classes[] = 'current-menu-item';
        return $classes;

    and the offending line is if(strpos($link, $item->url) !== false)

    Is this something you can help with ? Thank you


  • Vinod Dalvi

    Hi @eschmidtke,

    I hope you are well today and thanks for posting on the forum.

    I tried to access your site http://corpakms.net/ but it's displaying the following message.

    Site undergoing maintenance.

    I could reproduce this notice on my site using latest version of Recent Custom Posts plugin.

    This is a simple PHP notice and most of the time it doesn't affect functionality of site so it is nothing to worry about!

    Just set WP_DEBUG to false in your wp-config.php file.

    This will hide the warning messages and you will be able to use your site normally.

    If you want to fix this notice then you can do so by making the following change in the Recent Custom Posts plugin file on line number 301 as following.

    Recent Custom Posts File :

    Before Editing:
    'caller_get_posts' => 1

    After Editing:
    'ignore_sticky_posts' => 1

    I have also notified the plugin developer to fix this notice in the plugin code and it will be fixed in the future version of plugin.

    Vinod Dalvi