Answers for "how to access post id from get_posts wordpress"

PHP
3

wordpress get post id

// Retrieve the ID of the current item in the WordPress Loop.
get_the_ID()
Posted by: Guest on February-19-2021
0

wp get_posts return ids

get_posts(array(
    'fields'          => 'ids', // Only get post IDs
    'posts_per_page'  => -1
));
Posted by: Guest on August-02-2021

Code answers related to "how to access post id from get_posts wordpress"

Browse Popular Code Answers by Language