-
-
Save thecodepoetry/5780af5fba4538e4dc25 to your computer and use it in GitHub Desktop.
Shortcode in header text area - Armada
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
case 'text_area': | |
$top_text = of_get_option('header-text', ''); | |
if ( $top_text ) { | |
echo '<div class="text-area">' . wpautop($top_text) . '</div>'; | |
} | |
break; | |
to | |
case 'text_area': | |
$top_text = of_get_option('header-text', ''); | |
$top_text = apply_filters('the_content', $top_text ); //additional line | |
if ( $top_text ) { | |
echo '<div class="text-area">' . wpautop($top_text) . '</div>'; | |
} | |
break; |
Using wpautop
later cause rendering issue with shortcodes by adding <br>
and <p>
tags on entire page. It's better to provide with a small basic html editor instead of textarea
and then using wpautop
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit function presscore_render_header_elements ../dt-the7/inc/helpers/header-helpers.php line ~ 307