Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecodepoetry/5780af5fba4538e4dc25 to your computer and use it in GitHub Desktop.
Save thecodepoetry/5780af5fba4538e4dc25 to your computer and use it in GitHub Desktop.
Shortcode in header text area - Armada
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;
@thecodepoetry
Copy link
Author

Edit function presscore_render_header_elements ../dt-the7/inc/helpers/header-helpers.php line ~ 307

@zishanj
Copy link

zishanj commented Mar 26, 2015

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