Skip Navigation

[Résolu] Visual composer issue

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I'm seeing Visual Composer shortcodes written onto the page when I update a View using AJAX.

Solution: Add the following custom code to help display shortcodes from Visual Composer more effectively after an AJAX update:

/* --------------------------------------------- */
// VC RENDER SHORTCODES AFTER AJAX
add_action('init', 'add_mapped_shortcodes_on_init');
function add_mapped_shortcodes_on_init()
{
  WPBMap::addAllMappedShortcodes();
}
This support ticket is created Il y a 6 années et 7 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 réponses, has 2 voix.

Last updated by Anonyme Il y a 6 années et 7 mois.

Assisted by: Christian Cox.

Auteur
Publications
#571287

Anonyme
download.jpg
download (1).jpg

Hi, I created a view with a custom search.
hidden link
hidden link
The template of the results is created using Visual Composer.

On the page loading there are already shown some results, correctly.
After changing some filed in the search, everything is messing out

Why?

#571456

That's most likely because you're using AJAX to update the results. Try adding this code to your functions.php file to cause Visual Composer shortcodes to be rendered for AJAX updates:


/* --------------------------------------------- */
// VC RENDER SHORTCODES AFTER AJAX
add_action('init', 'add_mapped_shortcodes_on_init');
function add_mapped_shortcodes_on_init()
{
  WPBMap::addAllMappedShortcodes();
}
#571468

Anonyme

Working now!
Thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.