Wordpress homepage text between first two posts

Discussion in 'HTML & Website Design' started by intro, Oct 4, 2018.

  1. #1
    How to implement text between first two posts on homepage in a Wordpress site?
     
    intro, Oct 4, 2018 IP
  2. intro

    intro Well-Known Member

    Messages:
    689
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #2
    You can lock the thread, I found a solution in a plugin called Ad Inserter in the misc filter option.
     
    intro, Oct 4, 2018 IP
  3. JasEvic

    JasEvic Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Thank you for this, I've checked Ad Inserter, pretty neat but for an easier way without plugins I recommend editing and adding something like this:

    <?php
    if (($wp_query->current_post + 1) < ($wp_query->post_count)) {
    echo '<div class="post-item-divider">Post Divider</div>';
    }
    ?>
     
    JasEvic, Oct 16, 2018 IP
  4. AlphaNine_Vini

    AlphaNine_Vini Active Member

    Messages:
    218
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    88
    #4
    You can also use this plugin : "Add widget after content" . There are other options as well not just content. I recommend to check this our on Wordpress plugins.
     
    AlphaNine_Vini, Oct 30, 2018 IP