Sometime we may need to add an advertisement or adsense ads after our first post. That is quite easy to do. However, how if we want to add multiple advertisements after certain number of posts? See how it can be done..
- First open your themes index.php file using any of your favorite editor.
- Find the following code of line:
[sourcecode language=’php’]
- Advertisement -
[/sourcecode]
- Copy the code below and paste it before the above code.
[sourcecode language=’php’]
- Advertisement -
[/sourcecode]
- Scroll more down the index.php page and find the following the code of line:
[sourcecode language=’php’]
[/sourcecode]
- Same procedure, copy and paste the code below before the code above.
[sourcecode language=’php’]
[/sourcecode]
- Finally, create two files named as ads1.php and ads2.php and paste any advertisement code into both the files. Not only advertisement actually. You can try to insert anything, really.
- Make sure to put both files into the same directory as the index.php file.
- Advertisement -
awesome, just what i needed…thanks.
That was an awesome tip! Good luck with your work.
Glad they’re useful to you. Thanks!