Webmango
Member
Posted 3 months ago #
Hi,
I've successfully added adsense code to the 2 posts on my blog. When you click the text link to the posts from the homepage, the ads appear. However, the main site navigation is through the horizontal menu. I have used the category name to link to the posts.
When I click on to the posts via the menu, the adsense ads do not appear in the post. Can anyone tell me why this may be?
Thanks
Kevin Muldoon
Member
Posted 3 months ago #
What's the site url...I'll have a look at it for you :)
Webmango
Member
Posted 3 months ago #
Kevin Muldoon
Member
Posted 3 months ago #
The top links don't go to the posts. They go to category archives.
So you will need to edit your category.php or archive.php accordingly if you want ads there.
If you visit http://www.shaadi-advisor.com/category/photographers/ or http://www.shaadi-advisor.com/category/outfits/make-up/ and then click on the post title you will be taken to the single.php template which shows the post.
Webmango
Member
Posted 3 months ago #
Thanks Kevin. I had a feeling this was the problem but I hadn't a clue why it would be this way. Do you know what I should add into the category.php or archive.php? I've never done this before.
Kevin Muldoon
Member
Posted 3 months ago #
I'd have to look at the theme and look at the templates etc. It should be similar to what you added to your single.php template.
Webmango
Member
Posted 3 months ago #
I didn't add anything to them. I just put the adsense code into the individual posts using a plugin but as far as I understand you can't put html into categories.
Kevin Muldoon
Member
Posted 3 months ago #
Looks like the plugin only works with posts and pages and not archives. You'd have to edit your templates manually.
Webmango
Member
Posted 3 months ago #
Ok thanks. I'll have a look around for ways to do this.
Thanks for you help,
Kevin Muldoon
Member
Posted 3 months ago #
No problem. Best of luck :)