Answers for "wordpress get posts in ids"

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

Browse Popular Code Answers by Language