最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

html - How can I add a google play badge to my header and footer?

programmeradmin0浏览0评论

How I can add images or edit html for the header and footers within wordpress.

I am looking in the header and footer sections under both "Theme Panel" and "Appearance" but can't figure out how to add html anywhere for adding the Google Play badge.

How I can add images or edit html for the header and footers within wordpress.

I am looking in the header and footer sections under both "Theme Panel" and "Appearance" but can't figure out how to add html anywhere for adding the Google Play badge.

Share Improve this question edited May 15, 2018 at 15:02 John Murphy asked Mar 30, 2018 at 11:14 John MurphyJohn Murphy 1152 silver badges7 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

First of all, you can modify your header and footer from either using FTP client else from WP admin dashboard. if you are not familiar with FTP the please follow following steps.

1.Go to WP admin dashboard.
2.Under the Appearance menu, there is an option for edit theme. name it Edit.
3.In right side section list of files under the theme, ll be list.
4.Click on header.php and footer.php for edit header and footer accordingly.

please refer this for Google badge and paste the code in header or footer as per your needs.

I hope its useful and solve your issue.

You can edit your header and footer file or you can insert these codes in the functions.php file

function add_google_code($url="",$utm_code="",$utm_campaign=""){ ?>
<a href='<?php echo $url ?>?utm_source=<?php echo $utm_code ?>&utm_campaign=<?php echo $utm_campaign ?>&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google/intl/en_us/badges/images/generic/en_badge_web_generic.eps'/></a>

add_action('wp_head','add_google_code','#url','#utm_code','#utm_campaign');
add_action('wp_footer','add_google_code','#url','#utm_code','#utm_campaign');

Now save it and refresh the main site you can see your badge. You need to replace the

#url with your app url
#utm_code utm code with the utm code ...
发布评论

评论列表(0)

  1. 暂无评论