Change WordPress Shortcode added in to post

remove_shortcode( ‘gallery’ ); add_shortcode( ‘gallery’, function( $atts ) { $atts = shortcode_atts( array( ‘ids’ => ” ), $atts ); return do_shortcode( “[wp-slideshow include=\”$atts[ids]\”]” ); } ); This may be better than replacing the gallery shortcode as if you decide to change plugin you will have the standard gallery shortcode which many plugins will work with … Read more

Create shortcode in Child Theme?

Shortcodes don’t ‘echo’, they need to ‘return’ something. So I guess it will work if you put your functions content between ob_start and ob_get_clean so you return everything inbetween: function yourfunction(){ ob_start(); /* insert here the code of your function */ $output = ob_get_clean(); return $output; }

How to add class or id to shortcode HTML elements?

You could abandon the shortcodes and use HTML. <div class=”row full-width whatever”> [one_third]1[/one_third] [one_third]2[/one_third] [one_third]3[/one_third] </div> OR you could easily just wrap all of your code in another div and target the [row] element through CSS: <div class=”your_special_wrapper”> [row] [one_third]1[/one_third] [one_third]2[/one_third] [one_third]3[/one_third] [/row] </div> <style> .your_special_wrapper div{ /*whatever css you need*/ } </style>

How to Modify WordPress Default Image Gallery Shortcode

You could try this plugin: https://wordpress.org/plugins/wp-pagination/ It makes a javascript approach to paging. For my projects i always started to build galleries using custom post types or repeaterfields with acf: http://www.advancedcustomfields.com/add-ons/repeater-field/ WordPress built in gallery function is… well almost unfunctional. 🙂

WordPress Shortcode callback function with a plugin

Rick’s answer is incorrect, as the documentation for add_shortcode specifies that “the function called by the shortcode should never produce an output of any kind”. Instead, you should return the text that you want the shortcode to output. So, try having display_sheet_form return that text instead of echoing it.