Quantcast
Channel: Skye Themes — Skye Themes
Viewing all articles
Browse latest Browse all 2

Get post id

$
0
0

You should be able to get the queried object id and use that for comparison inside your custom loop.. Before your existing loop code(what you have posted above), but obviously after the opening PHP tag..

global $wp_query;
$current_id = $wp_query->get_queried_object_id();

You should be able to get the queried object id and use that for comparison inside your custom loop.

if( $current_id == get_the_ID() ) {
 // This result is the current one
}
else {
 // Not current
}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images