WordPress.org

Ready to get started?Download WordPress

Forums

Easing Slider "Lite"
[resolved] "No search results" page yields string of errors above header (5 posts)

  1. A-minus
    Member
    Posted 8 months ago #

    Hello,
    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!

    http://wordpress.org/plugins/easing-slider/

  2. A-minus
    Member
    Posted 8 months ago #

    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.

  3. MatthewRuddy
    Member
    Plugin Author

    Posted 8 months ago #

    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.

  4. A-minus
    Member
    Posted 8 months ago #

    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.

  5. MatthewRuddy
    Member
    Plugin Author

    Posted 8 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic