2

My WordPress site's title not showing. It's just displaying the domain like, www.example.com.

Please suggest how to display the proper title tag.

6

Add this code to your functions.php

if ( !function_exists( 'yourtheme_setup' ) ) {
    function yourtheme_setup() {
        /*
         * Let WordPress manage the document title.
         * By adding theme support, we declare that this theme does not use a
         * hard-coded <title> tag in the document head, and expect WordPress to
         * provide it for us.
         */
        add_theme_support( 'title-tag' );
    }

    add_action( 'after_setup_theme', 'yourtheme_setup' );
}

Or, if your functions.php already have after_setup_theme, just add the line add_theme_support( 'title-tag' ); into your after_setup_theme. (Source)

protected by Community Sep 9 '18 at 11:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.