Support » Plugin: Easing Slider » "No search results" page yields string of errors above header

  • Resolved A-minus


    I have a series of conditionals which places easingslider lite on the home page only, and other header images on each section of the site (and that section’s children). I thought I had every eventuality taken care of, but I see now that when somebody searches for something not on the site, it yields a bunch of warnings above the default home header, in this format:

    Warning: in_array() expects parameter 2 to be array, null given in /home/content/11/12008011/html/wp-content/themes/twentytwelve-child/header.php on line 61

    one for each else or elseif page header.

    You can see the relevant header code here. Do you know of anything I can add to my conditionals to accommodate the no-search-results page? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Forgot to include, I am using a child theme of twenty-twelve, but besides this custom header code, there are no other relevant structural modifications to the theme.

    Plugin Author MatthewRuddy


    Hi @a-minus, this doesn’t unfortunately appear to be an Easing Slider issue :/

    Hard to tell what is going wrong here – maybe use an is_array( $post->ancestors ) check before checking if the specified values are within that array.

    It could be that on certain occasions, $post->ancestors isn’t any array therefore throwing this error.

    Thank you! Now that I think of it, it really isn’t anything to do with ESL, you’re right – just a broader question of accommodating the no-results result.

    Decided to try that and that didn’t work, but I did find an is_search() conditional which works for search pages and no-result search pages. Thanks again.

    Plugin Author MatthewRuddy


    Glad to hear you managed to get it sorted 🙂 Going to make this topic as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘"No search results" page yields string of errors above header’ is closed to new replies.