How to Create Shortcodes on WordPress Functions File

Create Easy Shortcodes for your WordPress Website. Modify your functions.php with the following snippet and get rolling.

This is a snippet you can use when creating your shortcodes for WordPress. It makes it easy for you to reuse any of your functions

// Function to add subscribe text to posts and pages
  function subscribe_link_shortcode() {
    return 'If you enjoyed this article, I encourage you to <a href="" title="Subscribe to Our Blog">subscribe to The Code Beast blog via RSS</a>.';
add_shortcode('subscribe', 'subscribe_link_shortcode');

The Shortcode you would insert within your pages would be.