anders361 Posted February 9, 2015 Report Share Posted February 9, 2015 I have some custom PHP code I want to use for: - putting an AdSense ad in the middle of the text in single articles - taking off ads that shall not have ads How easy would it be to use this in Yosemite theme? Can I edit the PHP/HTML easily and insert calls to the custom functions (they are in functions.php)? Or would I need to convert it to WordPress short codes? I also worry this will make theme updates more difficult. Link to comment Share on other sites More sharing options...
Support ToddMTS Posted February 12, 2015 Support Report Share Posted February 12, 2015 Hello, You can edit the loop in single.php file to make those type of edits in the theme. You could use a child theme to avoid replacing the edits after you update the theme or you could use a plugin like Quick Adsense to insert inside posts with ease without editing any core php files. Hope that helps, please don't hesitate to let us know if you need help with anything else. 🏁Rank #1 on Google With our WordPress SEO Plugin. ⚡Score a 💯on PageSpeed and Dominate Search Rankings. ✏ Editing theme files? Please create a child theme to make your changes update-proof. Link to comment Share on other sites More sharing options...
marcin179 Posted September 15, 2017 Report Share Posted September 15, 2017 (edited) Hello, I still struggle a bit with AdSense in Yosemite. All I need to do is: 1. AdManagement section, Below Post Content field, add google code like this <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-xxxxxxxxxxxx" data-ad-slot="yyyyyyyyyy"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> (XXXXX and YYYYY used to mask actual numbers here) 2. Styling Options / Custom CSS field added (found on this forum) .bottomad { float:none; width: 100%; } Is that all? I had ads for a moment, then they disappeared again... Thanks for any suggestions! Edited September 15, 2017 by marcin179 Link to comment Share on other sites More sharing options...
Support Jitendraa Posted September 15, 2017 Support Report Share Posted September 15, 2017 Hello, Thank you for contacting MyThemeShop and sorry for the issue you are facing. Please stat a new ticket here so that we can help you better. Looking forward to helping you. Thank you. 🏁Rank #1 on Google With our WordPress SEO Plugin. ⚡Score a 💯on PageSpeed and Dominate Search Rankings. ✏ Editing theme files? Please create a child theme to make your changes update-proof. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now