• Hey all,

    I am using a star rating plugin to rate my posts and pages. I now want to display the top rated, but it seems as though the WP query function is not returning pages, only posts.

    Is there a way to work around this?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • You didn’t describe the “WP query function” you are using but the 'post_type'=>'pages' is normally used when trying to return pages.

    I’m looking for a way to use query_posts to pull pages and posts. Specifically, I’m trying to get a sllider to display 3 specific pages as well as the most recent post in a particular category, but can’t figure out how to modify query_post to do that.

    Here’s the original code calling the three pages:

    query_posts(array('post_type' => 'page',
    						'orderby' => 'menu_order',
    						'order' => 'ASC',
    						'post__in' => get_option('simplepress_feat_pages'),
    						'showposts' => 3));

    I tried

    query_posts(array('post_type' => 'page',
    						'orderby' => 'menu_order',
    						'order' => 'ASC',
    						'post__in' => get_option('simplepress_feat_pages'),
    						'showposts' => 3),
    						array(
    						'post-type' => 'post',
    						'cat' => 4,
    						'order' => 'ASC',
    						'showposts' => 1));

    but that didn’t quite cut it. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to query posts AND pages’ is closed to new replies.