• Resolved willywhy

    (@willywhy)


    I tried using the PHP code you have to add KIA subtitles to the page title Meta Tag. Seems to break my site when I put it in the functions.php. Is it possible there is an error in the PHP? I wouldn’t be able to tell.

    ps. I just noticed you gave an amazing response to a previous question I had a few months ago but I didn’t see it until now…so I donated to your plugin. Thanks!

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

    (@helgatheviking)

    You are correct that the code in the FAQ has a syntax error. Sorry about that and thanks for pointing it out. This should fix it.

    function kia_add_subtitle_to_wp_title( $title ) {
    	if ( is_single() && function_exists( 'get_the_subtitle' ) && $subtitle == get_the_subtitle( get_the_ID() ) ) {
    		$title .= $subtitle;
    	}
    }
    add_filter( 'wp_title', 'kia_add_subtitle_to_wp_title' );

    Thanks for the donation!

Viewing 1 replies (of 1 total)
  • The topic ‘Add to page title Meta Tag’ is closed to new replies.