Forums

[closed] Using PHP to identify the last post on a page (2 posts)

  1. tqualizerstore
    Member
    Posted 3 years ago #

    Hi everyone,

    I need to identify the last post displayed on a page, and once its been identified I need to prevent my adsense code from being displayed.

    The code I have is from another post,

    if ($wp_query->post_count !== $wp_query->current_post) {

    }

    but I cannot figure out how to get the adsense code inside the { }'s. Just pasting the code between them doesn't work,

    Can anyone advise how to get it to recognize the code?

  2. moshu
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.