Hi there,
I’m trying to extend your nice plugin with a custom filter hook.
I’m trying to show some content on a singular post that only shows up if the post author is viewing the post, so they can edit and view some statistics on the post. But I am having trouble…
Here’s the code I used, in my functions.php file:
add_filter($if_shortcode_filter_prefix.'current_user_is_author','my_condition_evaluator');
function my_condition_evaluator($value)
{
$evaluate=current_user_can('author');
return $evaluate;
}
First, do I have the general syntax correct?
Second, do you know if my evaluation criteria of current_user_can(‘author’) will work for this? I’m using the shortcode on a singular post.
Thanks!
]]>Is it possible to say:
if user has a website (field in his user profile) then display the URL,
if not then display something else (text “you still to enter your website”)
If yes, could anybody help me get the right code? ??
Thank you in advance!
]]>I’d like have a page that displays different woocommerce products to different user roles. Can I use this plugin for user roles?
]]>Hi how to use this plugin. I would like to have shortcode based on condition. Like when check box is checked i would like to have shortcode value as true and if it is unchecked then shortcode value to be false. Is this can be achieved/
]]>Thanks for this plugin, it works great!
Unfortunately, it doesn’t work as expected if you have nested ifs. Now the nested [/if] closes the first [if] block and you end up with “[/if]” at the bottom of the page.
[if …]
[if …]
[/if]
[/if]
Perhaps an easy solution would be to add something like [if1 …][if2 …][/if2][/if1].
]]>Hi,
I am looking for a way to display an image on a page ‘that is predicated on if a remotely hosted image is available or not. For example..
When the remotely hosted image cannot be found because the remote server that hosts the image is unavailable, I want to automatically display a locally hosted temporary image in its place until the remote image’s server comes back online.
Is this doable with “If Shortcode” – and if so, how please?
]]>Receive this error when attempting to install: Parse error: syntax error, unexpected T_FUNCTION in /home/content/03/8214003/html/wp-content/plugins/if-shortcode/plugin.php on line 87
]]>Please helpme, i need show one image if the user is login or other imagen if visitor
Who is the stament or command and wait add background to plug? i need transparent if possible?
Thanks
]]>