Printing Shortcodes Efficiently in WordPress – Best Practice

Konstantin Koveshenin from Automattic publishes some great little tips on his personal blog occasionally.

His post titled Don’t do_shortcode is one example of 2 ways you can print short codes and which one is best practice.

In this post, we’ll look at examples of how the 2 methods work and how to use them via your child themes functions file in any theme.

Firstly, here’s a very basic function which creates a short code named [text_shortcode] for demonstration purposes.

Related Tutorials


Comments

2 responses to “Printing Shortcodes Efficiently in WordPress – Best Practice”

  1. […] The only problem is, shortcodes are not the most efficient way to execute a function or print your gallery as you can read more about here. […]

  2. […] Learn about: Printing Shortcodes Efficiently in WordPress – Best Practice […]

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.