Navigation überspringen

[Gelöst] Site Reviews Shortcode error

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

Problem: I would like to display a Site Reviews form on my site, but it needs to be specific to the current post. I can't seem to use the site_reviews_form shortcode in a Custom Field in my Elementor template.

Solution: Use a Text Editor element and the syntax as shown here:

[site_reviews_form assign_to="[wpv-post-id]"]
This support ticket is created vor 5 Jahren, 7 Monaten. 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.

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 12 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von reimundH vor 5 Jahren, 7 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1247130
correct.png
incorrect.png

Hello,

I use Toolset and Elementor together. To implement a guestbook I use a shortcode. If I insert the shortcode directly in Elementor it works perfectly.
In my case it is necessary to use the dynamic-funktion. So I put the shortcode in a Toolset custom field. If I insert the shortcode via dynamic, the guestbook is displayed incorrectly. (see attached screenshots)
I´ve asked the Elementor-Support already. They recommended me to insert this code:

add_filter( 'elementor_pro/dynamic_tags/shortcode/should_escape', '__return_false' );

to the theme’s function.php file. Unfortunately without change.

Now I hope you can help me.

Thanks in advance.

Rest regards
Reimund

#1247144

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Reimund,

Thank you for contacting our support forum.

I'm not getting things so clear from your screenshot, however when you add your custom shortcode to one of our Types custom fields it doesn't work ?

Could you try adding it to a Custom WYSIWYG field and see if that helps.
Thanks,
Shane

#1247148

Hi Shane,

first of all thanks for your super-fast reply!
I´ve tried with the WYSIWYG field. Same error.

The screenshots shown what happen if I add the shortcode [site_reviews_form assign_to="924"]
manually or via dynamic.

Best regards
Reimund

#1247153

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Reimund,

If you were to add the custom shortcode to a toolset field and then display this field on the frontend without the use of elementor, does the issue still remain ?

I know of cases where elementor will remove any custom coding from our fields.

Also please try adding the field to the elementor template using the field shortcode itself and not using the shortcode inserter for types field that elementor provides.

Thanks,
Shane

#1247157

Hi Shane,

if I insert it this way, it works.
However in my case I use several guestbooks, so the shortcode has a separate page ID.
So it is necessary to use the dynamic function. Correct me if Im wrong.

Best regards
Reimund

#1247171

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Reimund,

"if I insert it this way, it works."

Could you be a little bit more specific on the way you tried that works ?

I'm assuming that the assign_to="924" parameter is the id of the current page correct?

Please let me know.
Thanks,
Shane

#1247201

Hi Shane,

I mean if I add the shortcode by myself to the Elementor template. That works.
And if I ad the shortcode without Elementor and just using Toolset. That works also.
Correct, "924" is the page ID.

Best regards
Reimund

#1247287

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Reimund,

Ok try this use case.

Add the your WYSIWYG field to an Editor field in your elementor template. Do not load the field using the elementor custom field option.

Then add your custom shortcode to the Types field. You have the option to do it like this assign_to="[wpv-post-id]"

Please let me know if this use case works fine. It should still load your post id dynamically because of the [wpv-post-id] shortcode.

Thanks,
Shane

#1247337

Hi Shane,

unfortunately the same issue.
Hmm... I don´t understand why it only work if I add it by myself.
Maybe do you have another recommendation how I can realize independent guestbooks for several profile.
If not it´s okay. I don´t want to steal your time unnecessary.

Best regards
Reimund

#1248383

Hi, Shane is on holiday today so I'm helping with his tickets. I'm not clear from your description - is the problem occurring on both the front-end of the site AND in the Elementor editor, or only in the editor?

#1248435

Hi Christian,

on both the front-end of the site and in the Elementor editor.

#1248581

On my local site, I'm able to use this shortcode in a Text Editor element:

[site_reviews_form assign_to="[wpv-post-id]"]

If this isn't working for you, I'll need to log in and take a closer look.

#1252111

My issue is resolved now. Thank you!