Page title variable
-
Hello,
I would like to display the title of the displayed page in a generic slide (to reduce the bounce tax).
Is this possible and what would be the variable of the page title and implementation?
THANKSThe page I need help with: [log in to see the link]
-
Hi @renaisonp
I am sorry, but we don’t have an option for that. The slider can only display the results that you have already built in our backend. So the page where it gets displayed doesn’t really matter for us.
But what could probably work for you, is using a shortcode that outputs the data that you want to display, and you could add that shortcode to the slider:
However please note that, as we mention in the documentation above, officially we don’t support shortcodes in the slider and we can not provide support for these and problems caused by them.
Best regards,
Laszlo.All right.
We must therefore create a dynamic short code (in javascript) and so we can use this short code in a text field (or other?)?
We have the pro version
Above short code ?
https://spidergems.com/create-shortcode-wordpress-page-title/
-
This reply was modified 3 years ago by
renaisonp.
Hi @renaisonp
By shortcode I actually meant a WordPress shortcode ( PHP ) that can be registerered with the add_shortcode() function:
Note: I see you mention that you are a Pro user. If you will have any questions or problems connected to a feature that is available on in Smart Slider 3 Pro, then please get in touch with us rather over the ticket system:
as on this forum we are only allowed to provide support for the Free version, as per the forum guide lines:
Hi @renaisonp
Meanwhile I noticed that you modified your message and added a link with the WordPress shortcode. Yes, I meant a shortcode like that.
Yes I have the pro version.
But the problem is soon solved here.
So I just created the php function in the site theme and now I have shortcode that matches the page titles.Can I use this short code in a simple text field or how to insert it in the slider?
Example short code at the end of the page:
https://www.alcor-controles.fr/ici-la-carte-des-pollutions-des-sols-en-france/
Yes it’s good !
You can see that the slide now takes the title of the page, example:
https://www.alcor-controles.fr/ici-la-carte-des-pollutions-des-sols-en-france/
A shortcode that outputs a simple text could work in the Text Layer. However I need to mention that the text layer allows only certain HTML tags: https://smartslider.helpscoutdocs.com/article/1832-text-layer
Other tags will be filtered out, which could make the results of the shortcode look completely different. So generally we don’t suggest adding shortcodes via the Text Layer but instead the HTML Layer, that is available in the Pro version. But as I mentioned above, on this forum we are not allowed to discuss topics about premium features. So if you still have questions or problems, connected to premium features, please contact us directly.
Anyways I am glad you managed to achieve your goals.
Tip: You might need to clear your cache so logged out users will also see the modifications you made.
Yes of course I cleared the cache and tried on several browsers and disconnected.
The short code works in a simple text field, even on tablet, Safari browser etc…
-
This reply was modified 3 years ago by
The topic ‘Page title variable’ is closed to new replies.