extendify / extendable

WordPress block theme for Full Site Editing (FSE) brought to you from the team at Extendify.
https://wordpress.org/themes/extendable
21 stars 0 forks source link

How to insert verification codes to extendify theme - no header.php file #149

Open Rolevents opened 6 days ago

Rolevents commented 6 days ago

-hi there. I'm not much of a programmer, but a digital marketer so please help me find the solution to insert different verification codes to the theme tags. Usually I create a child theme for my client's wordpress websites and insert GTM and Facbook verification codes there so they will not be overwritten but I can't find one. So how should I go about this? I have acces to theme files on the server. The setup was pretty easy through my server provider Zone.ee and I used some AI feature to set everything up. Looking good and I prefer to not go back to Astra + Elementor sh*t hahahaha.

Sry for the stupid question, but please guide me through it. ;)

clubkert commented 6 days ago

Hi @Rolevents,

Thanks for reaching out. The Extendable theme is a block theme that uses the new Full Site Editing (FSE) technique, which is why there’s no header.php file. However, you can still insert verification codes into the site using the Extendable Child theme by adding the code to the functions.php file.

  1. Get the Extendable Child theme from here.
  2. Unzip the Extendable Child theme.
  3. Edit the functions.php file.
  4. Add this code snippet to the functions.php file:
    function extendable_insert_custom_head_meta_and_scripts() {
    ?>
    <!-- Google Tag Manager -->
    <script>/* Your GTM code here */</script>
    <!-- End Google Tag Manager -->
    <!-- Facebook Verification -->
    <meta name=“facebook-domain-verification” content=“your_facebook_verification_code” />
    <?php
    }
    add_action(‘wp_head’, ‘extendable_insert_custom_head_meta_and_scripts’);
  5. Add your verification codes in the code you just added inside functions.php and save the file.
  6. Zip the Extendable Child theme file and upload it to the site:
    • Go to your WordPress dashboard.
    • Navigate to Appearance > Themes.
    • Click on Add New and then Upload Theme.
    • Upload the extendable-child.zip file you just created and activate the theme.

If you need further assistance, feel free to ask!

Rolevents commented 6 days ago

Hi. Wow, thanks for the quick reply and the help with child theme. Will look into it and try to implement the child theme. Parimate soovidegaRoland KivitareTartu, Eesti53853935On 27. Jun 2024, at 04:52, Chris Lubkert @.***> wrote: Hi @Rolevents, Thanks for reaching out. The Extendable theme is a block theme that uses the new Full Site Editing (FSE) technique, which is why there’s no header.php file. However, you can still insert verification codes into the site using the Extendable Child theme by adding the code to the functions.php file.

Get the Extendable Child theme from here. Unzip the Extendable Child theme. Edit the functions.php file. Add this code snippet to the functions.php file:

function extendable_insert_custom_head_meta_and_scripts() { ?>

<script>/* Your GTM code here */</script>
<!-- End Google Tag Manager -->
<!-- Facebook Verification -->
<meta name=“facebook-domain-verification” content=“your_facebook_verification_code” />
<?php

} add_action(‘wp_head’, ‘extendable_insert_custom_head_meta_and_scripts’);

Add your verification codes in the code you just added inside functions.php and save the file. Zip the Extendable Child theme file and upload it to the site:

Go to your WordPress dashboard. Navigate to Appearance > Themes. Click on Add New and then Upload Theme. Upload the extendable-child.zip file you just created and activate the theme.

If you need further assistance, feel free to ask!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>