add_theme_support( ‘title_tag’ ) is not showing title on index.php

i’m developing a theme.
I read there that themes should have the support to title tags declaring it in functions.php. I did so, together with removing any title in head.php, but my index has no title.

My functions.php has this:

add_action("after_setup_theme", "mytheme_setup");

function mytheme_setup () {
    add_theme_support( 'title_tag' );
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size(356, 245);

Now header.php, very basic atm

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php endif; ?>
    <link href="" rel="stylesheet"> 
    <?php wp_head(); ?>

As final note, i should say that not even the way with wp_title() worked. The only way to show something is to put some bloginfo() thing. Any help would be appreciated.

Read more here: add_theme_support( ‘title_tag’ ) is not showing title on index.php

Leave a Reply

Your email address will not be published. Required fields are marked *