WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
Featured Page Text - Line break (5 posts)

  1. Bos213
    Member
    Posted 8 months ago #

    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.

  2. nikeo
    Member
    Theme Author

    Posted 8 months ago #

    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

  3. sarfarazsajjad
    Member
    Posted 5 months ago #

    hi,

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

  4. ElectricFeet
    Member
    Posted 5 months ago #

    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?

  5. Novastream
    Member
    Posted 4 months ago #

    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 =)

Reply

You must log in to post.

About this Theme

About this Topic