• Hi,

    I would like to add line breaks into the featured text on the homepage of my website. I already have tried to use < br />, but it only works within the Customizr screen and not on the actual website. Please advise.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi,
    this is not easy to do right now without diving into the code but is already fixed in the next version (released this week)
    Stay connected!
    Cheers

    hi,

    I have been waiting for this feature but it appears that its not added yet, can you please suggest any other way possible

    Yes, when in Customiz’it, the preview takes the <br/> into account, but when you save and view the page, it reverts back to ignoring it.

    I tried using the tc_fp_text_sanitize filter in class-content-featured-pages.php, but unfortunately that doesn’t work. It looks like the text is being sanitized (stripped of html) before it gets to that filter.

    Nikeo, is there a possibility of adding this to the theme?

    WordPress 3.8.1
    Customizr 3.1.6

    Try open up class-content-featured-pages.php

    Change the following:

    $text                           = ( empty($featured_text) && !post_password_required($featured_page_id) ) ? strip_tags(apply_filters( 'the_content' , $page->post_excerpt )) : $featured_text ;
                $text                           = ( empty($text) && !post_password_required($featured_page_id) ) ? strip_tags(apply_filters( 'the_content' , $page->post_content )) : $text ;

    to

    $text                           = ( empty($featured_text) && !post_password_required($featured_page_id) ) ? apply_filters( 'the_content' , $page->post_excerpt ) : $featured_text ;
                $text                           = ( empty($text) && !post_password_required($featured_page_id) ) ? apply_filters( 'the_content' , $page->post_content ) : $text ;

    I hope it helps =)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Featured Page Text – Line break’ is closed to new replies.