Does not pick up all images and VC code as excerpt

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Does not pick up all images and VC code as excerpt

This topic contains 2 replies, has 2 voices, and was last updated by Mark Klinefelter Mark Klinefelter 6 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7279
    Mark Klinefelter
    Mark Klinefelter
    Participant

    Hello Ernest. Mark in Miami. I left you an email earlier in the week regarding your other plugin. Right now, I am fine tuning the search bar. I am using the index engine so it picks up the pictures and articles in the accordion tiles that describe pet diseases. The only issue (please see screenshots) is that the regular page photos are not picked up. I have a default photo of a painting of a Burmese cat lounging on a sofa as you can see but not the page picture. Also the excerpt is VC code and not the actual word excerpt. I have gone through the knowledge base and tried some of the picture ideas but no luck. I must tell you, there are many settings. That is great but maybe I am missing something. Thanks. After writing this i will turn off 2 factor cell authentication if you need to get in the back end.

    Regards, Mark, Miami, FL

    Attachments:
    You must be logged in to view attached files.
    #7288
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I’ve tried to access the site, but I’m getting redirected to this URL: http://www.kingjamesbibleonline.org/http:/www.petvetoasis.com/blocked/

    Altough I know what is causing the problem. Someome reported an issue with VC shortcodes a while back, and after hours I was able to determine that Visual Composer is no longer loading it’s shortcodes in ajax context. This is a huge problem, as any ajax powered plugin will return the visual composer shortcodes instead of the executed formatted content.

    I contacted their support about this problem, but they weren’t too helpful with me. I even bough a separate hosting, and made a plugin to demonstrate the problem + I gave them full access to the environment. After one week they responded how should I solve it, but I had to ask 5 times to tell me if this is intentional or a bug, so I can make the critical changes in Ajax Search Pro.

    Anyways, to apply a temporary fix, add this code to your active themes function.php file:

    function asp_force_load_vc_shortcodes( $post_ID ) {
      // VC 4.6+ fix: Shortcodes are not loaded in ajax responses
      if ( method_exists("WPBMap", "addAllMappedShortcodes") )
        WPBMap::addAllMappedShortcodes();
    }
    add_action( 'asp_before_search', 'asp_force_load_vc_shortcodes' );

    I’m hoping this will fix both of the issues. Let me know if this works!

    The next release of the plugin is coming soon, I already implemented this fix directly based on their support response. I sure hope they are not planning to change this again.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #7290
    Mark Klinefelter
    Mark Klinefelter
    Participant

    Thanks Ernest. It worked quite nicely. I use a Child theme so it won’t get overwritten with theme updates. When you do come out with the new
    update should i delete what I just put into function.php? Getting VC to change anything is like pulling teeth. I thought they would try to help
    developers. Helping developers indirectly means more sales of VC for them. Go figure.

    Regards, Mark

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

You must be logged in to reply to this topic.