Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #498644

    Hi,

    Found this link and followed the instruction https://kriesi.at/support/topic/thumbnails-on-search-results-page/
    i have the following error
    Notice: Undefined index: size in /wamp/www/test/wp-content/themes/enfold/includes/loop-search.php on line 25

    I just discovered code snippets plugin and find that cool! :D Is there a way to add to code snippets that don’t alter the parent theme?

    #499257

    Hi senso!

    Please refer to this link: https://kriesi.at/support/topic/add-featured-image-to-search-results/

    Cheers!
    Yigit

    #535222

    Notice: Undefined variable: post_id in /var/www/html/wp-content/themes/enfold-child/includes/loop-search.php on line 34
    Notice: Undefined variable: size in /var/www/html/wp-content/themes/enfold-child/includes/loop-search.php on line 34
    Notice: Undefined variable: attr in /var/www/html/wp-content/themes/enfold-child/includes/loop-search.php on line 34
    —————————————————————-
    I have the above errors.

    #535805

    Hi!

    Replace this line:

    $searchthumb    = get_the_post_thumbnail( $post_id, $size, $attr );
    

    .. with:

    $searchthumb    = get_the_post_thumbnail( $post_id, 'square' );
    

    Best regards,
    Ismael

    #536019

    Hi Ismael,

    I have this error

    Notice: Undefined variable: post_id in /var/www/html/wp-content/themes/enfold-child/includes/loop-search.php on line 34

    #538124

    Hi!

    replace Ismael’s last line with this:

    $searchthumb    = get_the_post_thumbnail( $_post->ID, 'square' );
    

    Regards,
    Andy

    #542194

    Hi Andy,

    All the error messages disappeared after I turn off wordpress debug. define('WP_DEBUG', false);
    Are there any issue that I should watch out for?

    #542344

    Hey!

    Glad you figured it out!
    If you run into any issues, please let us know

    Regards,
    Yigit

    #542795

    Hi Yigit,

    Hiding the error messages by turning debug off, is it normal and will there be any issues with it?

    Thanks

    #542894

    Hi,

    I don’t think it should cause any problems but if you should experience any then please let us know.

    Thanks,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.