Tagged: Allow Shortcode UI, RoyalSlider, Shortcode
This topic contains 6 replies, has 2 voices, and was last updated by thor 3 months, 3 weeks ago.
-
AuthorPosts
-
June 14, 2019 at 3:51 pm #9412
I want to have the shortcode from RoyalSlider plugin appear in the Piklist shortcodes.
At first I just tried adding it via the “Allow Shortcode UI” in Piklist’s “Settings”. But it doesn’t work? It is not appearing in the shortcodes windows next to Piklist Form as expected. Is there something I am missing?
I then startet creating a Piklist shortcode manually that would just print out the RoyalSlider. It requires an “id” attribute, but I noticed that “id” is not accepted as field in my piklist shortcode (or it is ignored). But if i set it to ” id” (with a space) it will appear in the shortcode (and even appears to work).
I have tested it with only Piklist adn RoyalSlider on a fresh WordPress installation on Linux server.
-
June 14, 2019 at 4:24 pm #9413
(but the space prefix hack with id is preventing the edit from working – since the space messes op the HTML class/ID so it won’t be able to fetch the value from the shortcode)
-
July 30, 2019 at 8:59 am #9475
any suggestions on solving this?
-
August 19, 2019 at 4:41 pm #9486
Unfortunately, we’re not familiar with the RoyalSlider plugin and how they register shortcodes. If they do it the WordPress way it should work.
-
August 20, 2019 at 3:11 am #9491
It is not a RoyalSlider issue – but Piklist when a field is called ‘id’.
(I need it to specifically be “id” so RoyalSlider picks up the attribute, so the solution is not using e.g. “my_id”)If I add the following then [blabla] is printed out but [blabla id=”first”] is expected :
<?php /* Name: Blabla Description: Testing Shortcode: blabla Icon: dashicons-format-gallery */ piklist('field', array( 'type' => 'select', 'field' => 'id', 'label' => 'My select', 'choices' => array( 'first' => 'First Choice', 'second' => 'Second Choice', 'third' => 'Third Choice' ) ));
-
August 20, 2019 at 2:08 pm #9494
You wrote originally that “It requires an “id” attribute,”. What requires an “id” attribute? RoyalSlider?
If so, does that plugin have a filter that you can change it with?
-
August 21, 2019 at 2:57 am #9496
Yes, id is required – and no filter for that. Perhaps a nested shortcode is the solution (a custom piklist shortocde that returns do_shortcode with royalslider compatible shortcode), but don’t know about performance though?
-
AuthorPosts
The topic ‘Shortcode problems’ is closed to new replies.