Answers for "wordpress loop over posts but exclude current post"

PHP
0

wordpress loop over posts but exclude current post

$args = array(
    'numberposts' => 5,
    'offset' => 0,
    'category' => 7,
    'post__not_in' => array( $post->ID )
);
$myposts2 = get_posts($args);
Posted by: Guest on April-23-2020

Code answers related to "wordpress loop over posts but exclude current post"

Browse Popular Code Answers by Language