-
AuthorPosts
-
August 31, 2015 at 4:11 am #374217
BenParticipantI created a child them “renew” stack and added the following to functions.php (I got this from one of the other forum posts – in fact it was the third one since the others all had some php code problems)
add_action(“wp_head”, “x_add_google_code”);
function x_add_google_code(){
?>
<meta name=”google-site-verification” content=” my verification code” />
<?php
}
However, when I go to “view source” the meta tag has not been added.Also, there is a problem with my homepage. The recent posts is not acting correctly. There is only 1 post selected, yet it looks like it is trying to show 2. It looks fine in cornerstone.
Here is the complete functions.php
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= add_action("wp_head", "x_add_google_code"); function x_add_google_code(){ ?> <meta name="google-site-verification" content="my verification code" /> <?php } <?php });My site:
ielts7.guruAugust 31, 2015 at 4:19 am #374224
Paul RModeratorHi,
Please replace the entire code in your functions.php file with this.
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= add_action("wp_head", "x_add_google_code",99999); function x_add_google_code(){ ?> <meta name="google-site-verification" content="my verification code" /> <?php }Hope that helps.
August 31, 2015 at 4:51 am #374250
BenParticipantI have done this but I still can’t see it in the source code:
view-source:http://www.ielts7.guru/Is there some child theme set up I have missed? Also, the problem with recent-posts is still there.
August 31, 2015 at 4:55 am #374255
Paul RModeratorHi,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
August 31, 2015 at 5:23 am #374277
BenParticipantThis reply has been marked as private.August 31, 2015 at 5:35 am #374286
ThaiModeratorThis reply has been marked as private.August 31, 2015 at 6:04 am #374309
BenParticipantThe problem was I had put the new functions.php in the x-child/framework/views/renew ,which was what I thought I should do based on the documentation and forum posts.
I moved it to x-child/ and now the site works – except I STILL CAN’T see that the google verification code is in place.
August 31, 2015 at 6:08 am #374312
ThaiModeratorHi There,
Upon checking your website’s source, I can see the Google Verification Code:

Regards!
August 31, 2015 at 6:30 am #374324
BenParticipantGreat! Thanks!
August 31, 2015 at 6:50 am #374339
Paul RModeratorYou’re welcome!
September 30, 2015 at 1:21 pm #605187
Seth RParticipantI need to add verification code for Google Work Apps and Analytics. I’m using the standard theme. No Child.
Any suggestions?
Thanks!
September 30, 2015 at 1:59 pm #605230
Prasant RaiModeratorHello Seth,
Thanks for writing in!
To setup Google apps kindly walk-through following thread:
https://community.theme.co/forums/topic/adding-googles-verification-meta-tag/
To implement Google Analytics, kindly use Google Analytics plugin that comes with X theme package.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-374217 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
