Breaking the intro title to two lines.

Home Forums Monument Valley Breaking the intro title to two lines.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21174

    Lana
    Participant

    Breaking the intro title to two lines.

    Resolved

    Hey there! Have you noticed this support service is provided FREE of charge?
    If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you

    Consider a donation →

    Hey Oliver,

    I hope my message finds you well!

    I was wondering if there a way to break the intro title to two lines – except for reducing the width of the block? I tried the latter and it worked but I would like to have more control over my title. I want it to look exactly like that:
    We help people build
    their dream homes

    I tried <br /> but it didn’t work. I also tried to assign span class to the part of the sentence I would want to go down:

    .newline {
    	display: block;
    }

    That didn’t work either.

    Also, do you think it might be possible to turn intro widget titles into hyperlinks? I tried to add <a href> but it didn’t work out.

    Thank you for your time in advance :-)

    • This topic was modified 1 week, 5 days ago by  Oliver Juhas. Reason: Formatting code
    #21179

    Oliver Juhas
    Keymaster

    Hi Lana,

    Please note that this is a WordPress default behavior, most likely due to security reasons.

    To bypass WordPress default behavior and enable using HTML in intro title only, please use this code in your child theme‘s functions.php file:

    function child_theme_allow_intro_html() {
    	if ( doing_action( 'wmhook_monument_valley_intro_before' ) ) {
    		// Overriding WordPress default behavior.
    		remove_filter( 'single_post_title', 'strip_tags' );
    	} else {
    		// Reverting back to WordPress default behavior.
    		add_filter( 'single_post_title', 'strip_tags' );
    	}
    }
    add_action( 'wmhook_monument_valley_intro_before', 'child_theme_allow_intro_html' );
    add_action( 'wmhook_monument_valley_intro_after', 'child_theme_allow_intro_html' );

    As for widget title links, please check the 3rd party solution using a plugin.

    Best regards,

    Oliver Juhas
    WebMan Design

    #21192

    Lana
    Participant

    Thank you SO much!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.