display in WP_Query loop
-
Hello,
I have WP_Query for a custom post type, I would like to display the rating in this list of custom post types, I imagine I need to send the custom post type ID to the function, but that is just my guess. How do i make the below work?
<?php
$the_query = new WP_Query( array(‘posts_per_page’=>20,
‘post_type’ =>’services’,
‘post_status’ => ‘publish’
);
?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post();
?>
<h2><?php echo get_the_title(); ?></h2>
<?php
Custom_Ratings::get_rating_object_image_src();
echo Custom_Ratings_Public::display();
echo Custom_Ratings_Public::vote();endwhile;
?>The page I need help with: [log in to see the link]
- The topic ‘display in WP_Query loop’ is closed to new replies.