Need to get the last post id (1 post)

  1. soms2m
    Posted 8 years ago #

    Hello All,

    I am developing a site using wordpress, in that i have a section like if the tht is a latest post i need to dispaly some specfic contents, i have done it using if(($post->ID) == "the post id number"). This is working.

    But what i really need is i need to get the post ID dynamically.

    If i am using using ($post->ID) alone i'm getting that, but it will affect
    other post too,

    For example i need the contents displyed only in if the page have most recent post i have using if($post->ID) == "ID number" this is not dispaly the specfic contents in other post. but if if use $post->ID the specfic contents also disaplyed in other post when going for comments page or add a respond page.

    what should i do for this?

    please give me a sugesstion. I am getting deadline of my project..

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.