Skip Navigation

[Gelöst] Visual composer issue

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 6 Jahre, 11 Monate. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Anonym vor 6 Jahre, 11 Monate.

Assistiert von: Christian Cox.

Author
Artikel
#571287

Anonym
download.jpg
download (1).jpg

Hi, I created a view with a custom search.
versteckter Link
versteckter 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

Anonym

Working now!
Thanks

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.