Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   How can I insert an ads in the middle of Homepage? (http://forum.bytesforall.com/showthread.php?t=23289)

alexmai Sep 22, 2015 05:33 AM

How can I insert an ads in the middle of Homepage?
 
Do I need to edit the index.php?

or any function in theme options will do the trick?

or I have to get a widget or plugin?

juggledad Sep 22, 2015 06:10 AM

Unless you can find a plugin that will do it, you will have to put some code in index.php

alexmai Sep 22, 2015 07:16 AM

Can you tell me how can I do it with index.php?

I did some plugin research, seems like no plugin will do it.

juggledad Sep 22, 2015 07:35 AM

Depending on how fancy you want, i would first get the number of posts per page, then divide that in half. Then setup a counter and incriment it each time you went thru the loop. When the counter matched have the value of the posts per page, I'd execute the code you have to display the the ad

alexmai Sep 22, 2015 05:47 PM

No need to be fancy, just want to display the ad in the middle of the homepage ( I have 14 posts on homepage).

juggledad Sep 22, 2015 07:29 PM

Then setup a counter and incriment it each time you go thru the loop. When the counter hits 7 execute the code you have to display the the ad


All times are GMT -6. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.