-
Author
-
October 11, 2014 at 15:55 #31415MjParticipant
Hi, I encountered that shortcodes are not allowed in the future item grid? How am I able to allow this?
October 12, 2014 at 15:26 #31468sharmstrModerator@abe: I’ve dug into this a bit and it appears the preg_match_all statement in kleo_grid.php is not finding any featured items that contain shortcodes. I suck at regular expressions so I haven’t tried fixing it yet. But you can see in the attached screenshot that ‘content’ contains two feature items, but the preg_match only finds one.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
Attachments:
You must be logged in to view attached files.October 12, 2014 at 18:07 #31475sharmstrModeratorOkay. I think I got it working. I dont know how to use this is the child theme to make it upgrade safe, but probably wont be and issue if @abe makes it part of the core. Anyhow, as mentioned before, the issue was with the regular expression. To fix it
– open /plugins/k-elements/shortcodes/templates/kleo_grid.php
– comment out line 44 (verify this is the correct line!!)
– add the new regular expression below itso this
COPY CODE$sh = preg_match_all('~\[kleo_feature_item([^\[\]]*)]([^\[\]]+)\[/kleo_feature_item]~', $content, $childs);
should be this
COPY CODE//$sh = preg_match_all('~\[kleo_feature_item([^\[\]]*)]([^\[\]]+)\[/kleo_feature_item]~', $content, $childs); $sh = preg_match_all('~\[kleo_feature_item([\s\S]*)]\[/kleo_feature_item]~', $content, $childs);
I havent tested all scenarios, but seems to be working without breaking other things. Again, I suck at regular expressions :/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
Attachments:
You must be logged in to view attached files.October 12, 2014 at 18:37 #31483AbeKeymasterHmm… interesting.. I will take a look and fix it. This will be included in next week update
Thank you favorite user @sharmstr 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.October 12, 2014 at 18:38 #31485sharmstrModeratorNo problem. I’m sure you’ll test it because I didnt 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 13, 2014 at 14:30 #31562AbeKeymasterI came with this code because I tested your suggestion and wasn’t matching if you didn’t had a shortcode inside
COPY CODE$sh = preg_match_all('~\[kleo_feature_item([\s\S]*)]([^\[\]]*)\[/kleo_feature_item]~', $content, $childs);
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.October 13, 2014 at 14:41 #31566sharmstrModeratorHmmm. Yes it was. Look at my screenshot. But, that’s fine with me. Like I said, I suck at regexps. I always have 🙂 Just glad its fixed. Thanks!
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.