badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Allowing line breaks in featured-content

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41906
    rodrigozamorano
    Participant

    Hello, I’d like to know if it is posible that text that appears in featured-content not remove line breaks or BR.

    This is the resulting text:
    <div class=”featured-content”>Médico Cirujano U. de Chile Otorrinolaringólogo U. de Chile Rinología, cirugía endoscópica nasal y de base de cráneo</div>

    But I’d like something like:
    <div class=”featured-content”>Médico Cirujano U. de Chile<br />
    Otorrinolaringólogo U. de Chile<br />
    Rinología, cirugía endoscópica nasal y de base de cráneo</div>

    Thank you very much for your time.

    #41918

    Hi rodrigozamorano,

    This is not possible. it needs code customization. We have used get_the_excerpt() function. Go to theme folder -> library -> structure -> header-extension.php on line no 379 you will see this code
    $excerpt = get_the_excerpt(); remove it and add this below code
    $excerpt = get_the_content();

    Now one thing. If you make a direct changes in the code then while updating to new version each and every time you need to add the same thing again and again.

    Other way is making a child theme. First unhook the function and create a child theme and customize the code. Don’t do anything in parent theme. So that while updating to new version your customized code will not be lost.

    Thank you!

    #42007
    rodrigozamorano
    Participant

    Thank you very much! You have been very kind. God bless you.

    #42085

    You welcome rodrigozamorano 🙂

    Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.