Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Show post in all category post

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #31985
    alinn
    Participant

    Who knows how to make at the end of each post to show all the post in that category?
    I found something: But is not working

    Same catogory



      $categories = get_the_category();
      $args = array( 'numberposts' => 3, 'category' => $categories[0]->cat_ID );
      $recent_posts = wp_get_recent_posts( $args );
      foreach( $recent_posts as $post ){
      echo '
    • ' . $post["post_title"].'
    • ';
      }
      ?>
Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.