Meta Tag in X: Theme Header (header.php)

I signed up through an affiliate partner and they need me to verify the ownership of the website. They said add the meta tag on the head of the website code. Then I watched some tutorials on how to do it. Go to WP dashboard, appearance then editor then look for header.php. But in which line do I add the meta tag?

Hello There,

Thanks for writing in! With X theme, we have a different templating system. If you need to add something to the header, you will have to do it the other way. Assuming that you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/HEADER/BASE.PHP
// -----------------------------------------------------------------------------
// Declares the DOCTYPE for the site, includes the <head>, opens the <body>
// element as well as the .x-root <div> and .x-site <div>.
// =============================================================================

$x_root_atts = x_atts( apply_filters( 'x_root_atts', array( 'id' => 'x-root', 'class' => 'x-root' ) ) );
$x_site_atts = x_atts( apply_filters( 'x_site_atts', array( 'id' => 'x-site', 'class' => 'x-site site' ) ) );

?>
<!DOCTYPE html>

<html class="no-js" <?php language_attributes(); ?>>

<head>
  <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

  <div <?php echo $x_root_atts; ?>>

    <?php do_action( 'x_before_site_begin' ); ?>

    <div <?php echo $x_site_atts; ?>>

    <?php do_action( 'x_after_site_begin' ); ?>

Do not forget to add the code in the header in between head tags:

<head>
  <?php wp_head(); ?>
   
  <!-- you may add your code here -->

</head>

3] Save the file named as base.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/header/

You will need to create the folder path since it does not exist yet in your child theme.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.