This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Problem with TablePress on my website search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Problem with TablePress on my website search Reply To: Problem with TablePress on my website search

#34834
Ernest MarcinkoErnest Marcinko
Keymaster

I’m afraid it is not the search causing the issue – the post bodies are empty after applying the do_shortcode or the the_content filters.

If you want, you can open a support ticket with the WPBakery page builder authors, they may know what the problem is, and how to resove it.

You can tell them, that the issue is:

Within an ajax request, applying the do_shortcode() function or the “the_content” filter returns an empty string, instead of the executed shortcodes, ex.:

$post = get_post($id); //$post->post_content contains the content with vc_ shortcodes
$content = do_shortcode($post->post_content); // Empty string
$content2 = apply_filters('the_content', $post->post_content); // Empty string

..adding the:

WPBMap::addAllMappedShortcodes();

..before the get_post(..) call, does not resolve the issue, still empty strings are returned.

It appears, that the shortcodes are not yet registered at that point of execution. Is there a way to load them either via settings or programmatically? Thank you!