Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   How to place a widget between posts on the home page (http://forum.bytesforall.com/showthread.php?t=15632)

sober Oct 12, 2011 09:54 AM

How to place a widget between posts on the home page
 
before using Atahualpa, I used a theme called themeshaper or themeframe (don't remember exactly) which had this option to place a widget after a said number of posts in the home page. Is that possible for Atahualpa. Would like to see if anyone can help me out on this. My site is this

juggledad Oct 12, 2011 01:55 PM

you need to add a counter and widget area in index.php in the loop, so before the loop you say
HTML Code:

$my_counter=1;
in the loop you add
HTML Code:

if counter = 5 {
  $my_counter = 0;
  new widget code goes here...
}
$my_counter = $my_counter + 1;

then add what you want in the widget area of the theme. With this, the widget area will only show after the 5th post


All times are GMT -6. The time now is 07:59 PM.

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