• Resolved mtjarrett

    (@mtjarrett)


    I just updated one of my sites. Now the title info in the browser tabs is gone. It just gives the site url.

    I’ve been reading how this is a big to do. That’s fine, I don’t care. Do what you want… but I have 7 websites, 5 of which use the same child theme. How am I supposed to fix this?

    How do I get back what was working great yesterday.

    Please help.

    Thanks.

Viewing 15 replies - 1 through 15 (of 25 total)
  • Hi @mtjarrett!

    This post discusses the changes to wp_title, though it was supposed to be backwards compatible.

    Would you mind uploading the code that generates the title in your theme to https://pastebin.com/ ? We can hopefully track down what’s going wrong from there.

    Thread Starter mtjarrett

    (@mtjarrett)

    Hi Gary,

    Thanks for your help.

    I have a child theme of Hemingway.

    The code is :

    <title><?php wp_title('|', true, 'right'); ?></title>

    Is that what you needed?

    Thread Starter mtjarrett

    (@mtjarrett)

    Also, I am certain everything was working fine before the update. I had my site open in two browsers and after noticing it in my main browser (where I stay logged in and where I ran the update from), I checked the site in the other browser and it looked correct. So I refreshed the page in that other browser and it went bad.

    Thread Starter mtjarrett

    (@mtjarrett)

    hey guys. any news on this?

    According to the link Gary Pendergast gave, and this link here (https://make.www.ads-software.com/themes/2015/08/25/title-tag-support-now-required/), there is a move to depreciate wp_title and replace with add_theme_support( 'title-tag' );.

    Though <title><?php wp_title('|', true, 'right'); ?></title> has always worked in my themes (…I build my own), I removed <title><?php wp_title('|', true, 'right'); ?></title> from my foundation and child themes and inserted add_theme_support( 'title-tag' ); into my foundation theme’s functions.php.

    The title is in the tabs. Tested in Firefox, Chrome, IE, and Opera – not in Safari because I have no Apple devices.

    Thread Starter mtjarrett

    (@mtjarrett)

    Thanks Neo.

    I understand that there is this move to lose the wp_title() bit. The problem is: what am I supposed to do now? I’m not a professional programmer. And here I have my first theme I updated no longer working. I have six other websites that I’m unwilling to update because I don’t want them to break too.

    Can anyone help me figure out what I need to do at this point. What does it mean to add theme support in my foundation functions.php?

    It really seems to me that WordPress has gone outside the boundary of offering something for everyone and now is moving toward being a software for developers only.

    Any help is appreciated. Thanks

    Who created your child theme for you?

    Thread Starter mtjarrett

    (@mtjarrett)

    i created the child theme. but it’s mostly just cutting and pasting to have this above that or add this class to this other thing, etc. basically an html &css child theme.

    Did you create a custom header.php or functions.php file in your child theme?

    Thread Starter mtjarrett

    (@mtjarrett)

    yes.

    the functions.php file i just copied from some site that was explaining how to make child themes. it has a block that starts with:

    function theme_enqueue_styles() …

    the header.php is just a cut and paste of the parent header.php with a couple blocks of things re-arranged.

    If your child theme’s header.php file contains:

    <title><?php wp_title('|', true, 'right'); ?></title>

    than I think it’s almost certainly your custom functions.php file that’s the real problem. Copying code wholesale from an unrelated site really isn’t a good idea as the code copied may be obsolete, incompatible with your current them or just plain bad code. How many lines are in the file?

    Thread Starter mtjarrett

    (@mtjarrett)

    this is the file:

    function theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style )
        );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

    Can you try changing:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

    to:

    // add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

    to temporarily inactivate that function.

    Thread Starter mtjarrett

    (@mtjarrett)

    did it. but it jacked up the whole site,

    In what way?

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘wp_title ?? what happened? i'm not a techie.’ is closed to new replies.