• Resolved indiemusicfinds

    (@indiemusicfinds)


    Hi, having a bit of trouble with this.

    I’ve been able to embed things between the 2nd and 3rd posts on homepage/page2/category/archive pages. But when I try to add the code to make it home page only too this just doesn’t seem to change anything.
    I’m a bit rubbish at coding so I might be putting these codes in the wrong order or something.

    Time to start from scratch, could anyone please produce such a code that will allow something to be put after the 2nd post on home page only.
    Thanks

    http://indiemusicfinds.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter indiemusicfinds

    (@indiemusicfinds)

    oh and I’d been trying something like this before

    <?php if (is_home() && $count == 1) : ?> <CENTER> 
    
    Example
    
      </CENTER> <?php endif; $count++; ?>
    			</div>
    Michael

    (@alchymyth)

    i see the output of your code (an empty html <center> tag) after post 2 on the home page – ond on the paged pages.

    if you don’t want the output on paginated pages, add a !is_paged() to your conditional statement.

    http://codex.ww.wp.xz.cn/Conditional_Tags

    Thread Starter indiemusicfinds

    (@indiemusicfinds)

    thanks alchymyth!
    it worked (:

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Embedding between posts on homepage only.’ is closed to new replies.