• Resolved izzyinstl

    (@izzyinstl)


    Hello
    I’m new to WP and really a rookie. I am trying to get my google page ranking up and can’t get meta tags for description or title to show up in the code of homepage when i do a source.

    been looking everywhere and found an article that says put this in the header.php after the page title.
    <?php if ( is_home() ) { ?>
    <meta name=”description” content=”My Description” />
    <?php } ?>

    i cannot find the page title in the code. Here is the code from my header.php:
    <?php
    /**
    * The Header for Customizr.
    *
    * Displays all of the <head> section and everything up till <div id=”main-wrapper”>
    *
    * @package Customizr
    * @since Customizr 1.0
    */

    ?>
    <!DOCTYPE html>
    <!–[if IE 7]>
    <html class=”ie ie7″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if IE 8]>
    <html class=”ie ie8″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if !(IE 7) | !(IE 8) ]><!–>
    <html <?php language_attributes(); ?>>
    <!–<![endif]–>
    <?php
    //the ‘__before_body’ hook is used by TC_header_main::$instance->tc_head_display()
    do_action( ‘__before_body’ );
    ?>

    <body <?php body_class(); ?> <?php echo apply_filters(‘tc_body_attributes’ , ‘itemscope itemtype=”https://schema.org/WebPage”&#8216;) ?>>

    <?php do_action( ‘__before_header’ ); ?>

    <header class=”<?php echo apply_filters(‘tc_header_classes’, ‘tc-header clearfix row-fluid’) ?>” role=”banner”>

    <?php
    //the ‘__header’ hook is used by (ordered by priorities) : TC_header_main::$instance->tc_logo_title_display(), TC_header_main::$instance->tc_tagline_display(), TC_header_main::$instance->tc_navbar_display()
    do_action( ‘__header’ );
    ?>

    </header>

    <?php
    //This hook is filtered with the slider : TC_slider::$instance->tc_slider_display()
    do_action ( ‘__after_header’ )
    ?>

    can someone tell me where to put that code? That’s supposed to let me add the meta tags?

    thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter izzyinstl

    (@izzyinstl)

    ok i am not sure what I did is correct to resolve this problem.

    I found the header.php if in this path: wp-content/themes/default/ I then copied it to my child folder then opened it with editor and added the meta tags there and saved. Is this correct?

    Will it now read the header.php in the child folder and use that info over the one in original path wp-content/themes/default/ ?

    I’m a noob at all this so just hope I’m not messing this up

    It appears this is not correct…. I went to look at page now it is not loading …anyone know how to fix this?

    Thread Starter izzyinstl

    (@izzyinstl)

    this is becoming more frustrating. Now when i go into the WP-Filemanager i can no longer find the path of wp-content/themes/default/ the only thing in the themes folder is a folder for customizr and the child. the default folder is missing, There is a header.php in the customizer folder but only the code in my first post is there which loos different from the one that WAS in the default folder.

    I cannot believe this program will not write meta tags to the index file automatically. I see them in the source code of all my other files but not the homepage.

    Thread Starter izzyinstl

    (@izzyinstl)

    here is my website so someone can look at the page source of the homepage. https://www.mystldj.com

    this si all the yost area that is in the homepage …
    <!– This site is optimized with the Yoast WordPress SEO plugin v1.6.3 – https://yoast.com/wordpress/plugins/seo/ –>
    <title></title>
    <meta property=”og:locale” content=”en_US” />
    <meta property=”og:type” content=”website” />
    <meta property=”og:site_name” content=”St. Louis DJs – Digital Entertainment” />
    <meta property=”article:publisher” content=”https://www.facebook.com/pages/Digital-Entertainment/209196282425503&#8243; />
    <meta property=”fb:admins” content=”1233428540″ />
    <!– / Yoast WordPress SEO plugin. –>

    where can i find this file and can i just edit and add the meta title and description?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘customizr and yost meta tags not in home page code’ is closed to new replies.