Skip to content

Instantly share code, notes, and snippets.

@chrisdavidmiles
Created September 12, 2018 06:08
Show Gist options
  • Save chrisdavidmiles/2cdba07130478deee41b8a4f298f9fa9 to your computer and use it in GitHub Desktop.
Save chrisdavidmiles/2cdba07130478deee41b8a4f298f9fa9 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Enable Shortcodes in Text Widgets
Description: This is a site specific plugin that makes it possible to use shortcodes inside text widgets. How cool is that!
Version: 0.1
Author: Chris David Miles
Author URI: https://chrisdavidmiles.com
Text Domain: enable-shortcodes-in-text-widgets
*/
add_filter('widget_text','do_shortcode');
@chrisdavidmiles
Copy link
Author

This is a site specific plugin made as an example for chrisdavidmiles.com/guide/how-to-make-a-site-specific-plugin-for-wordpress .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment