Created
April 10, 2018 12:51
-
-
Save mikaelz/2bbea669c6bc4503a8f16817e0861047 to your computer and use it in GitHub Desktop.
Fix rendering of YouTube player of link in do_shortcode
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 | |
// Hack due https://core.trac.wordpress.org/ticket/23431 issue | |
$embed = new WP_Embed(); | |
$content = $embed->run_shortcode( $wp_query->queried_object->description ); | |
echo '<div class="category-description">' . do_shortcode( $content ) . '</div>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment