[Resolved] using get_posts to grab from specific category
Now I know you can use get posts like this to get posts from a specific category:
$posts = get_posts(‘category=3&numberposts=5’);
My problem is this, I want wordpress to grab posts whose category is the same as the title of the page. So the page is called “Books”, it gets all posts from the category “Books”. I know theres the php the_title(); that grabs the title of the page, can I use this in get_posts to somehow make this work?
Is this at all possible? Any help or information would be appreciated.
- The topic ‘[Resolved] using get_posts to grab from specific category’ is closed to new replies.