Calling Posts from a Specific Category
-
Hey guys
I’m pretty new to wordpress and my PHP experience is limited. I’ve been dancing around this and unfortunately can’t find my exact answer in the Codex.
I have assigned a specific category (I call it Featured) and it has a cat_id of 44. I want to grab any post that is checked in the featured category and display it within in my set div.
I have looked over the get_the_category and haven’t been able to make it happen, it just displays the array I tried to call.
<?php
global $post;
$categories = get_the_category($post->ID);
var_dump($categories);
?>(I realize this is probably because I haven’t assigned the variable $categories but again, not really sure…
Not really sure… any help is greatly appreciated. Thanks!
- The topic ‘Calling Posts from a Specific Category’ is closed to new replies.