• Hey there!
    I need to list products, created with an (amazon) affiliate shortcode, in live results. I know the searchwp_do_shortcode, but as i’am a newb, i don’t know how to implement this right. Or maybe this is the default behavior of this function.

    To my functions.php i added this default code:

    function my_searchwp_do_shortcode( $do_shortcode, $post_being_indexed, $content_being_indexed, $meta_key_being_indexed ) {
    	return true;
    }
    add_filter( 'searchwp_do_shortcode', 'my_searchwp_do_shortcode', 10, 4 );

    But it doesn’t seem to find the products. It lists the post-page, where the shortcode with the products is placed. I need only the related product, not the whole post. Because there will be more than one product-shortcode for different products on one page and i don’t want to list other products in same post. I hope I was precise enough.
    Addition: I’m using Relevanssi in addition with searchwp ajax live. Both free versions.
    Thank you!

  • The topic ‘Search in shortcode content’ is closed to new replies.