How to pull category specific events into designated page
-
Hello! I’m having the hardest time figuring out how to pull single events with a specific category into a specific page on my site. I tried using the same php code for pulling the wordpress post categories:
<?php
global $post;
$myposts = get_posts(‘numberposts=5&category=35’);
foreach($myposts as $post) :
?>
<img src=”<?php the_field(‘cal_picture’);?>”>
But I’m assuming the category number for an event’s category is pulled differently than a normal post category? So is there a way to have an event with a specific category appear on different pages of my website? If anyone could help me on this, that would be so cool! Thanks!
- The topic ‘How to pull category specific events into designated page’ is closed to new replies.