Answers for "echo wordpress page id"

PHP
0

get_the_id wordpress

function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
    $post = get_post();
    return ! empty( $post ) ? $post->ID : false;
}
Posted by: Guest on October-26-2020
0

get the current page id in wordpress

$page_id = get_queried_object_id();
Posted by: Guest on September-03-2020

Browse Popular Code Answers by Language