-
AuthorPosts
-
August 27, 2014 at 8:26 am #93167
Hello X Team,
I’m using theme X Renew stack. I want to place Google AdSense code just below the post headline and end of the post. What is the file I have to place the code kindly guide me.
August 27, 2014 at 8:39 am #93173Hi There,
You then set set-up a child theme for that,
Please follow these guides
-> http://theme.co/x/member/kb/how-to-setup-child-themes/
-> http://theme.co/x/member/kb/customization-best-practices/Copy these files to your child theme and add our adsense code in there.
x/framework/views/renew/_content-post-footer.php x/framework/views/renew/_content-post-header.php
Hope that helps.
Cheers
August 27, 2014 at 9:32 am #93214I’m using Renew child theme. Where should I copy those files under views, Global or Renew?
August 27, 2014 at 1:39 pm #93358Hi Anil,
Place the copied file in this path:
x-child-renew/framework/views/renew/_content-post-header.php
&x-child-renew/framework/views/renew/_content-post-footer.php
September 11, 2014 at 7:51 am #102709Dear Support Team,
The files you recommended are wrong for my objective. My goal is to place adsense codes in blog posts. One ad should be just below the post heading, meta data and other one after the post before tags and comments not in the footer area.September 11, 2014 at 8:21 am #102737Hi Anil,
As advised in previous replies, you need to place codes into those files.
The header file controls the Post Tile & Meta & the Footer file controls the Tags & Comment Template placement. So if you place your Adsense codes into those file they’ll be placed in your desired area.
September 11, 2014 at 8:25 am #102742Dear Support Team,
I need ads in posts only not in pages or portfolios. When I placed the code in those files. Im seeing ads in home page post excerpts only. Kindly guide me exactly in which in which area i mean in the code I have to place the ad codes.September 11, 2014 at 9:11 am #102768Would 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.
September 11, 2014 at 9:17 am #102774Dear Team,
The header part is ok but Im confused where to place code in _content-post-footer.php Below is the code in that file. Kindly guide me where to place the code<?php // ============================================================================= // VIEWS/RENEW/_CONTENT-POST-FOOTER.PHP // ----------------------------------------------------------------------------- // Standard <footer> output for various posts. // ============================================================================= ?> <?php if ( has_tag() ) : ?> <footer class="entry-footer cf"> <?php echo get_the_tag_list( '<p><i class="x-icon-tags"></i> Tags: ', ', ', '</p>' ); ?> </footer> <?php endif; ?>
September 11, 2014 at 9:22 am #102778Before this line:
<?php echo get_the_tag_list( '<p><i class="x-icon-tags"></i> Tags: ', ', ', '</p>' ); ?>
As I said in previous reply, you can share your site url here so I can provide code to you to hide them from arhive/blog/homepage
October 21, 2014 at 6:25 am #129126This reply has been marked as private.October 21, 2014 at 1:07 pm #129366Hi There,
Please copy these following files to your child theme,
x/framework/views/renew/_content-post-footer.php
x/framework/views/renew/_content-post-header.phpit should be inside
x-child-renew/framework/views/renew/_content-post-footer.php
x-child-renew/framework/views/renew/_content-post-header.phpYou can add it anywhere you want.
e.g.
<?php // ============================================================================= // VIEWS/RENEW/_CONTENT-POST-FOOTER.PHP // ----------------------------------------------------------------------------- // Standard <footer> output for various posts. // ============================================================================= ?> <script type="text/javascript"><!-- google_ad_client = "pub-12412412412a4gfaw"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel = ""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "FFFFFF"; google_color_text = "FFFFFF"; google_color_url = "FFFFFF"; google_ui_features = "rc:0"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <?php if ( has_tag() ) : ?> <footer class="entry-footer cf"> <?php echo get_the_tag_list( '<p><i class="x-icon-tags"></i> Tags: ', ', ', '</p>' ); ?> </footer> <?php endif; ?>
or
<?php // ============================================================================= // VIEWS/RENEW/_CONTENT-POST-FOOTER.PHP // ----------------------------------------------------------------------------- // Standard <footer> output for various posts. // ============================================================================= ?> <?php if ( has_tag() ) : ?> <footer class="entry-footer cf"> <?php echo get_the_tag_list( '<p><i class="x-icon-tags"></i> Tags: ', ', ', '</p>' ); ?> </footer> <?php endif; ?> <script type="text/javascript"><!-- google_ad_client = "pub-12412412412a4gfaw"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel = ""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "FFFFFF"; google_color_text = "FFFFFF"; google_color_url = "FFFFFF"; google_ui_features = "rc:0"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
Hope that helps
-
AuthorPosts