Johan Steen
Forum Replies Created
-
A text message to go with the red highlighting was added in the recent version to make it more obvious and clear that there is an issue.
Cheers,
JohanThanks for the heads up. This has been added, and will be included in the next release.
Cheers,
JohanCurrently, the maximum snippets is based on the server configuration. The number of items a post request allows to contain according to the php configuration. So one can tweak that value if required. I remember that the common default setting of PHP would allow somewhere around 300 snippets.
This limit will be lifted to allow unlimited snippets when the storage engine is updated in the plugin.
Cheers,
JohanHi,
Using other shortcodes in a shortcode snippet should work fine. Do you have any example of a plugin providing a shortcode that does not execute correctly from a shortcode snippet? If so I’ll take a look and see what the cause might be that it’s not working in that particular case.
Cheers,
JohanHi,
That’s the nature of PHP, the PHP snippet gets evaluated in it’s own scope, and does not have access to variables outside the scope.
As a workaround, what you can do is this, make the variables you need to access from a snippet to a global variable. Ie, for instance if you want to assign a value to a variable in your template, make it a global variable, like this:
$GLOBALS['foo'] = 'bar';Then to access the variable in a PHP snippet, you have two options, either
global $foo; echo $foo;or
echo $GLOBALS['foo'];Hope this helps.
Cheers,
JohanAreness, Post Snippets v2.5 will be out today, which will have the button restored in custom editors.
Cheers,
JohanHi,
Thanks for the report. A few other frontend plugins has seen similar behaviour. A fix is implemented that shall take care of this, and the updated version will be released very shortly.
Cheers,
JohanHi,
Thanks for the report. A few other frontend plugins has seen similar behaviour. A fix is implemented that shall take care of this, and the updated version will be released very shortly.
Cheers,
JohanMichael,
Thanks for your report. I’ve tried it and I can confirm the conflict you are seeing. The issue has been fixed, and an updated version of the plugin will be out very soon.
Cheers,
JohanClifford,
Thanks. I’ll include your pull request and shortly issue an updated version.
Excellent! πCheers,
JohanHi,
I tried the snippet with ACF and it shows no problem. My guess is that there is some other plugin interfering. You could try to disable all plugins and only enable Post Snippets and ACF and see if that works. Maybe also use the default theme at first. And then start reenabling plugins until finding out which one is preventing it to work.
s2am: The plugins you are referring to are commercial plugins, so you’ll need to contact the developer of Thrive Builder/Thrive Leads and ask their support what the problem is.
I can only help with possible conflicts with other free plugins.
Cheers,
JohanLasPalmas:
Yes, if you select the snippet to be a shortcode, and insert it as a shortcode, the output on the page will update if you update the snippet.
Cheers,
JohanHi,
Yes, WordPress 4.4 does no longer allow shortcodes with spaces in the name. There is no way to fix that except downgrading WordPress.
See this thread for some tips of how to automatically update shortcodes in all posts: https://wordpress.org/support/topic/upgrading-to-wordpress-44-breaks-post-snippets?replies=7
Cheers,
JohanMarie: Thanks, but no. Check with the theme author, as this seems to be a problem with the theme.
Cheers,
Johan