• How does one break the headline into 2 lines? <br> does not work.
    extra spaces do not work. Is there a special character one can use
    to specify where the line break should be placed?
    Thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @seeley,

    HTML isn’t allowed in the input fields, but you can manipulate the output via filters, for example:

    
    add_filter('age_gate_messaging', 'add_line_break', 10, 3);
    
    function add_line_break($html, $messages, $age)
    {
        // manipulate the message, eg. headline:
        $messages->headline = 'Enter Your Birthdate to Login -<br /> You Must be %s or Older';
    
        $html = '<h2 class="age-gate-subheading">' . sprintf($messages->headline, $age) . '</h2>';
        $html .= '<p class="age-gate-message">' . sprintf($messages->subheadline, $age) . '</p>';
    
        return $html;
    }
    

    However, I’d recommend using CSS to set some margins to make it break where you want it to.

    Thanks
    Phil

Viewing 1 replies (of 1 total)

The topic ‘Line Break in Headline’ is closed to new replies.