New answers tagged shortcode
2
votes
Accepted
Using a shortcode to get User Emails by role as specified in the shortcode, need help to allow for multiple roles
If you're trying to get users with all roles (in your example, administrator and author), your code looks like it should work.
If you want users with any role (administrator or author, you'll need to ...
1
vote
wp_nonce_field displaying twice
Shortcode and wp_nonce_field()
A shortcode is echoed. If it contains wp_nonce_field(), that is echoed again. Hence it is added twice to the DOM, which would be returned with an error (duplicate ID) by ...
0
votes
wordpress Shortocode running twice?
Maybe someone else will find it useful:
A shortcode is also a function. WordPress executes it twice.
At the moment of initialization of the functions.php file
At the moment of finding the shortcode ...
0
votes
How to call shortcode on button click
Vijay, Thank you for your assistance. I see what you are getting at with the example provided, but it appears to run the shortcode immediately on page load, but not on link click. Is there any way to ...
0
votes
Shortcode from a widget is wrapped in unwanted <p> element
I first used the solution of @Trevor, but had some problems with it when the shortcode is inside a link. Thus, I came up with an alternate solution, that checks with regular expression whether the ...
Top 50 recent answers are included
Related Tags
shortcode × 2765php × 372
plugins × 319
functions × 298
plugin-development × 188
custom-post-types × 145
filters × 94
customization × 91
posts × 90
gallery × 90
custom-field × 85
wp-query × 81
loop × 61
theme-development × 60
woocommerce-offtopic × 58
ajax × 58
widgets × 54
javascript × 53
images × 52
templates × 52
categories × 45
html × 43
jquery × 41
the-content × 41
advanced-custom-fields × 40