Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Splitting Title into Two Lines

Discussion in 'Misc WordPress Requests' started by bcworkz, Mar 20, 2018.

  1. bcworkz

    Guest

    Reply To: Splitting Title into Two Lines, by bcworkz

    Add this to the bottom of your theme’s functions.php:

    add_filter('the_title', function( $title ) {
    return is_admin() ? $title : html_entity_decode( $title );
    }, 99 );

    If what I think is going on is correct, this will allow inserted break tags (and many other HTML tags) to work correctly on the front end.

    You’ll need to reinstate this code after your theme is updated unless you create a child theme and place the code in the child’s functions.php. If you get an unexpected T_FUNCTION error because of this, your PHP version is out of date.

    Reply To: Splitting Title into Two Lines
     
    #1

Share This Page

Monarch Social Sharing Plugin