WordPress.org

Forums

Calling flexipages() creates debug notices (2 posts)

  1. tedinoz
    Member
    Posted 2 years ago #

    When flexipages is called within the template (rather than as a widget) is creates a bunch of debug notices. These don't stop execution but it would be nicer if they weren't there. Mostly they arise because certain variables are evaluated without being defined.
    Line 139 - change $show_home to isset($show_home)
    Line 238 - added the following:
    if(!isset($sort_order)) $sort_order = 'ASC';
    if(!isset($show_home)) $show_home = '';
    if(!isset($show_date)) $show_date = 0;
    if(!isset($date_format)) $date_format = '';
    if(!isset($dropdown)) $dropdown = '';
    Line 245 - changed $include to isset($include)

    On my site, I exclude pages/posts but I don't specifically include any. Nor do I set a value for Hierarchy. So, the routine starting on line 245 evaluates in the negative and doesn't set a value for $include. So I added the following at line 256:
    if(!isset($include)) $include = '';

  2. tedinoz
    Member
    Posted 2 years ago #

    Regarding my post above - (!isset($include))
    I note that I DO use hierarchy but, because the value is set to 1, the routine starting on line 245 is bypassed.

    So this extra line at line 256 is still desirable:
    if(!isset($include)) $include = '';

    Ted

Topic Closed

This topic has been closed to new replies.

About this Topic