Hi,
The shortcode does not work when included in a Bootsrap see image of page.
Is there a work around for this as I would prefer not to hard code in a page template.
Hi,
The shortcode does not work when included in a Bootsrap see image of page.
Is there a work around for this as I would prefer not to hard code in a page template.
Hi Brian.
Not sure I understand where you’re trying to use it. Could you explain it a bit more? Can you use other shortcodes there?
Thanks.
Here is the Bootstrap code I’m using in a page:
[s2If current_user_is(s2member_level4)]
If you are an administrator you will see some links here
[/s2If]
The s2Member-Profile short code works ok - the profile is displayed in the tab, But the s2If just displays as text as shown in the image.
Any ideas (I`m not sure how to show code in this message)?
You can use Markdown here, e.g. put code inside backticks.
What are you calling bootstrap code? A PHP page you created with some code? Or is it a WP page? Or a PHP page in a WP theme you’re creating?
I guess you have some way of parsing shortcode if the other one got parsed. It’s very strange that one would get parsed and the other not.
You could check if the s2If shortcode is registered. https://codex.wordpress.org/Function_Reference/shortcode_exists
Hi
I have the same problem. I write the following text in a wp page:
——————-
[s2If current_user_is(s2member_level4)]
Du kannst Befragungen erstellen.
Du bist für Teilnahmekandidaten verantwortlich. Diese müssen sich zunächst registrieren und bei dir rückmelden. Dann meldest du die Kandidaten dem Website-Admin.
[/s2If]
[s2If current_user_is(s2member_level3)]
Du kannst Quizze und Umfragen erstellen.
[/s2If]
[s2If current_user_is(s2member_level2)]
Du kannst an Befragungen teilnehmen
[/s2If]
[s2If current_user_is(s2member_level1)]
Du bist registrierter Quiz / Umfragen - Teilnehmer.
[/s2If]
[s2If current_user_is(s2member_level0)]
Du bist zwar registriert, kannst aber noch nirgends teilnehmen!
[/s2If]
[s2If !current_user_can(access_s2member_level0)]
Bitte registriere dich!
[/s2If]
——————-
and a last line:
——————-
[s2Member-Profile /]
——————-
All shortcodes except the last one are shown unparsed on the website:
I use:
What can I do?
TIA, franzl
That’s odd… The s2If is in the s2Member Framework.
I wonder if it’s wordpress is having a difficult time parsing the shortcodes when they’re next to each other…
Could you test adding a blank line between them?
[s2If current_user_is(s2member_level4)]
Du kannst Befragungen erstellen.
Du bist für Teilnahmekandidaten verantwortlich. Diese müssen sich zunächst registrieren und bei dir rückmelden. Dann meldest du die Kandidaten dem Website-Admin.
[/s2If]
[s2If current_user_is(s2member_level3)]
Du kannst Quizze und Umfragen erstellen.
[/s2If]
[s2If current_user_is(s2member_level2)]
Du kannst an Befragungen teilnehmen
[/s2If]
[s2If current_user_is(s2member_level1)]
Du bist registrierter Quiz / Umfragen - Teilnehmer.
[/s2If]
[s2If current_user_is(s2member_level0)]
Du bist zwar registriert, kannst aber noch nirgends teilnehmen!
[/s2If]
[s2If !current_user_can(access_s2member_level0)]
Bitte registriere dich!
[/s2If]
Yes! I did it, but with no effect.
Also I deactivated the Pro plugin and the Framework, I deleted the plugins and then I ran WP-Optimize.
Now I installed Framework and Pro plugin and activated them again.
No effect.
I see… What happens if you try a single s2If block, still doesn’t work?
Did you try other conditionals too?
A single s2If Block doesn‘t workQ
However! With another Block on the beginning suddenly all works fine.
So I put as first s2If conditional block an empty block:
[s2If is_user_logged_in()]
[/s2If]
Now everything works!
That’s such an unexpected and weird behavior! I’ll have to look into it.
But I’m glad you found a hack to make it work… Nice job!