not displaying Featured image from custom post

Home Forums Product Support Forums Ajax Search Pro for WordPress Support not displaying Featured image from custom post

This topic contains 1 reply, has 1 voice, and was last updated by otcom otcom 9 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4232
    otcom
    otcom
    Participant

    Hello
    i’ve added the search bar to find only custom post. in origin this post had a custom field to get an image and to display on fronted i added this snippet on functions.php

    function asp_cf_image( $image ) {
      if ($image != "" && strlen($image) < 10) {
        $atts = wp_get_attachment_image_src( $image );
        if (isset($atts[0]))
          return $atts[0];
        return null;
      }
      return $image;
    }

    now i’ve deleted that custom field to use the featured image panel and now i can’t get the image on search bar, it get only the default image.

    hope you can help me, thanks

    • This topic was modified 9 years, 1 month ago by otcom otcom.
    Attachments:
    You must be logged in to view attached files.
    #4319
    otcom
    otcom
    Participant

    please, can you help me?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.