get_the_ID()

1459870313php-logo-svg

get_the_ID() is a php function in WordPress. It retrieves the Post ID for a particular post. In WordPress, each post has a unique ID. There may be situations when you need to apply an action to a specific post. This can be done by using the get_the_ID function.

For Example,

if (get_the_ID() )=212 { ?>

Steps

<?php } ?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s