Created
February 27, 2018 11:31
-
-
Save alexminza/ca0a974cc8b5ec7a44ee751171f92474 to your computer and use it in GitHub Desktop.
WordPress shortcodes in titles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function do_shortcode_title($title) { | |
return do_shortcode($title); | |
} | |
add_filter('the_title', 'do_shortcode_title'); | |
add_filter('single_post_title', 'do_shortcode_title'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment