WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
"Featured Page" on front page - HTML in featured text (3 posts)

  1. gmandler
    Member
    Posted 7 months ago #

    An observation and I am not sure why it happens...

    When I entered "featured text" for the Feature Front page I can enter HTML and on the live preview screen it showed HTML. I thought "WOW AWESOME!".

    But then when I go to save it the formatting is ignore and the HTML is ignored.

    Is there anyway to make the featured text HTML? It seems that there is a hook in there but someone it gets lost once it is saved.

    thank you
    George

  2. nikeo
    Member
    Theme Author

    Posted 7 months ago #

    Hi, here's a quick fix for that to allow HTML tags in your featured text :
    Copy/paste in your functions.php

    add_filter( '__featured_page_text' , 'keep_html', 10, 2);
    function keep_html( $__options, $area ) {
    	return html_entity_decode((esc_html( $__options['tc_featured_text_'.$area] )));
    }

    Hope this helps

  3. capegranite
    Member
    Posted 7 months ago #

    Just tried that and is still ignoring my HTML. I am basically adding an image instead of the text for the featured page. I designed the image and added it with a simple html tag <img src="file location">. In the live preview it shows it beautifully but after save and publish the images do not show on the website.
    Same happens after I added your code to functions.php...

Reply

You must log in to post.

About this Theme

About this Topic