Hi, we are building a dynamic template in Elementor where the template is fetching various content from custom fields in custom posts that we have set up with Toolset types. There is one thing that we don't get working and after a lot of searching for information and testing with different Toolset custom types, we have gotten stuck. We would very much appreciate if you can point us in the right direction.
What we are trying to do is the following:
In the custom posts we want to have a custom field where we can insert a shortcode from SmartSlider 3, so that the slider will appear on the post/page that we have created with an Elementor single template.
What we have tried:
If we insert the shortcode in default content field of the post and use the Elementor (single) post content widget, the slider shows up fine on the page. Problem is that we want to use the content field elsewhere and would like to use a Toolset custom field for the shortcode instead, but whatever combination of Toolset custom field and Elementor widgets we cannot make the slider to show up.
Our question:
Isn't there any Toolset custom field type we can use, so that we can make Elementor understand that we want Elementor to "trigger" the shortcode?
I have attached a screenshot of the page where you can see how the slider appears on the page when we use the default content field together with the Elementor post content widget. We would like to use a Toolset custom field instead and get the same result.
Regards,
Jan
Hi, a WYSIWYG field is the best type of field to use when you want to embed shortcode(s). Then use the Types field shortcode to render the WYSIWYG field, for best results:
https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg
If that doesn't work as expected, we may need to take a closer look.
Hi, thanks for your reply!
I tried out the WYSIWIG field already yesterday several times, because I thought that could be the thing, but I couldn't get it to work. I tried again this morning, using several different Elementor widgets (including their shortcode widget), but it still doesn't display. Do you have any recommendation of which Elementor widget I should try?
Regards
Jan
Hi again, an update:
When using the WYSIWIG field together with the Elementor shortcode widget, Elementor picks up and displays the Smartslider code in live mode, but doesn't render the Slider. I also double checked and inserted the Smartslider shortcode straight into the Elementor shortcode widget. It works fine, the slider renders as expected. So the problem doesn't seem to be with Elementor.
//Jan
I would use a Text element in your Elementor template, then insert the types field shortcode for your wysiwyg field in the text element. If that's not working as expected, I can try running some tests with that plugin on my own environment. Since it's a paid plugin, I would need you to upload a copy somewhere and provide a download link. All URLs are obscured in the forum by default, so it will remain confidential.
I have tried with the text widget and several other widgets as well, but Elementor still doesn’t render the slider. It would be great if you can have a look. I can provide you with credentials so that you can log in to and test on a dev site that we are using for this project.
Okay, I will take a look. Private reply fields are active here.
Hi, the HTTP authentication credentials worked for me, but I'm unable to log in to wp-admin using the password you provided. Can you check and update the credentials for me?
Okay it looks like there was a problem because slider #11 was on the same page twice - once in the page content and another time in the template. The Smart Slider system apparently doesn't like to display the same slider twice, and there was a JavaScript error. I switched the custom field value to a different slider, #9, so you can see now. In the post custom field:
In the Elementor template:
[types field="smart-slider-3"][/types]
Thanks Cristian,
I had tried with one slider on the page as well before, but didn't get it to work. Seems that I did it the wrong way. Now I see that you haven't used Elementor Dynamic field dropdown in the widget like I had done. Instead you have referred to [types field="smart-slider-3"][/types] in the text field of the text editor without using Elementors dynamic dropdown.
So it cant be done using the dynamic dropdown in the Elementor widget?
No, I think not. Integration between Types and Elementor's dynamic content menu is still pretty new, and it works best with fields that store simple content. You can always create a Content Template or View and use the Toolset menus to insert the proper shortcode, then copy + paste that into the Elementor template. It's a couple more steps, but it will give you the ability to work with more complex field types and to select all the options you want in the popup menus.
Ok, I understand. Thank you for the help.
My issue is resolved now. Thank you!
In the reply #1197533 ... is the custom field slug defined by toolset titled "smart-slider-3" OR is "smart-slider-3" the slug defined by this 3rd party slider too.
I am trying to accomplish the same thing referencing the Gravity Forms shortcode and am running into similar described issues that may be resolved with that clarification.