Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the astra domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/sqrtyhjzaqx471/public_html/wp-includes/functions.php on line 6121
Avoid Current Post from Recent Posts List

Home Forums WordPress Avoid Current Post from Recent Posts List

Viewing 0 reply threads
  • Author
    Posts
    • #145
      avneesh
      Participant

      Add post__not_in in your array :

      $post = get_post();
      get_posts(  array(
                      'post__not_in' => array( $post->ID ),
          ));
Viewing 0 reply threads
  • You must be logged in to reply to this topic.
Scroll to Top