Search query: shortcode
Found 24 matching results
This cool little snippet was contributed by VRS from Russia. It enables you to display a set of linked gallery images. You can use this technique anywhere in your theme template file or in any WordPress Post or Page.
When WordPress processes shortcodes, it first passes the content through its wpautop() function to convert line breaks to <p></p> or <br /> tags. This order of processing can lead to unwanted paragraph and breaks scattered throughout your shortcode content. This post provides a simple way to prevent this from happening, so you can keep your […]
Here is a nice collection of useful WordPress shortcodes, including cool functionality like displaying author lists, automatic links, subscribe links, current date, and more!
I use these snippets all the time, so I’m posting them here at WP-Mix for easy access. The first shortcode can be used to display content only to logged-in users (based on capability). And the second shortcode can be used to display content only to visitors (non-logged-in users).
Here is an easy custom WordPress function to display your theme’s search form via shortcode. This makes it easy to display the search form on any Post or Page.
Ultra-quick guide to help you create a WordPress Shortcode. Aimed at experienced WordPress users who need a basic example of how to create shortcodes.
This example builds from the conditional do_shortcode technique to evaluate shortcodes during Ajax requests.
Quick snippet to call and evaluate WordPress shortcodes conditionally, outside of their normal Post/Page context.
Here is a sweet little WordPress shortcode to display content only to logged-in users. Visitors not logged in will see a custom message saying whatever you’d prefer.
One way to help reduce spam is to encode your email address whenever displaying publicly. Here is a function that will do just that: display an encoded version of whatever email address you specify.
Quick tip to enable WordPress shortcodes to be executed in widgets (and post content).
Creating your own custom shortcodes is another thing that WordPress makes very easy to do.