Jump to content
Sign in to follow this  
thebusysingleparent

How to edit theme to add code in various locations?

Recommended Posts

thebusysingleparent

I am wanting to use the Author Advertising plugin http://wordpress.org/extend/plugins/author-advertising-plugin/ This plugin will place ads in various locations in the theme. However, it doesn't quite work right with platform. It does, however, give the option of adding this <?php kd_template_ad($type); ?> code to the theme wherever I want the ads to display. So, please tell me how to edit the theme to place this code into the following locations: Above and below page content Above and below individual post content Above and below category and post-page content PS I am using platform-base

Share this post


Link to post
Share on other sites
catrina
It's not advisable to edit the theme directly since your changes will be overwritten when you upgrade, but you are already using PlatformBase, which is exactly what you need to be using. Are you familiar with adding hooks in the functions.php page?

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
thebusysingleparent
No, I'm not familiar at all. The plugin works but when it ads advert to the post it is also adding it to the header up in the header (in the black area) which looks ugly which is why I am trying to find another way. Also the section it creates for the header displays up in the black area - I would prefer it under the site branding or just above it below the black area. When I refer to the black area I am of course referring to how it looks without any changes to the default design or css. I'm learning css as I go but when it comes to php or functions and loops I'm still lost. I tried to add the php code the plugin provides into the content sidebar, that I added to the single post page template, (via text widget) but I'm assuming php doesn't work like that.

Share this post


Link to post
Share on other sites
catrina
I'm not certain PHP works in the text widget unless it's a shortcode designed to be put in the text widget itself. If you're new to hooks, please refer to this definition first: http://www.pagelines.com/wiki/Hooks. From there, I'll explain them further.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
thebusysingleparent
Ok, thanks, I'll check it out and come back later.

Share this post


Link to post
Share on other sites
thebusysingleparent
Actually I just found a widget that allows php. I will keep that link though to read up on later.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×