A page between posts (6 posts)

  1. omcfarlane
    Posted 9 years ago #


    I searched around and found links to getting adsense in between posts, and the links I found for the get-a-post and cg-inbetween plug-ins didn't seem to work any better (but that could also be my lacking of full blown PHP skills).

    What I would like, is to be able to insert content (an excerpt and more link) from a Page I made in WordPress in between my first post and the rest of the posts.

    I'm pretty sure that this is possible some how, but I can't seem to break the loop, everything I've tried just causes the page excerpt to be repeated at the end of every post.

    Thank you in advance for any help.

  2. moshu
    Posted 9 years ago #

    Although this guide is about adding adsense after post #1 or #2...
    the idea would be the same for inserting anything.

  3. omcfarlane
    Posted 9 years ago #

    Thank you for the heads up. I found that site earlier and tried it with the get-a-post plug-in, but when I do, nothing shows up.

    Here's my code --

    if ($postnum == $showadsense1) {
    <?php $postnum++; ?>

    It seems easy enough, but I must be missing something.

  4. omcfarlane
    Posted 9 years ago #

    Hi again,

    I've spent the last two hours trying every possible variant of that code I could possibly think of and while I can get it to display regular text, it refuses to return the requested page. I've use the get-a-post plug-in as well as the_permalink with the_excerpt function. Nothing seems to work.

    Any insight would be greatly appreciated.


  5. Kafkaesqui

    Posted 9 years ago #

    I'm thinking you'll have the same problems (and require the same solution) as discussed in this thread:


    (Note it's possible in your case, after creating a new WP_Query object, that the standard template tags like the_title() or the_content() will work as expected and you won't have to break things down as I explained to the other member. But no guarantees...)

  6. omcfarlane
    Posted 9 years ago #

    Oh my, thank you so much!

    I was going to writer about how I was 90% of the way there and request some more help because I noticed that Pages don't use excerpt tags but I couldn't find the correct array(?) to just display what was above the --more--.

    Low and behold I found this plug-in and now it works! I will say that if there is a non-plug-in way to do this same thing, I would be willing to try it but for now I'm all set.

    Thanks a lot for everyone's help!!!!!

Topic Closed

This topic has been closed to new replies.

About this Topic