Tutorial by Examples

Shortcodes are useful when you want to be able add more complex elements inline into the normal content editor. A shortcode in it's simplest for would look like this: function my_shortcode( ){ return "This is a shortcode"; } add_shortcode( 'my_shortcode', 'my_shortcode' ); It w...
Here is an example of a simple button short code: <?php function my_button_shortcode( $atts ) { // Parse the input attributes and assgn default values for the // attributes that are not specified on the shortcode $a = shortcode_atts( array( 'id' => '', 'ur...

Page 1 of 1