SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Destroyed by Syntax error

    What am I missing?

    Code:
    $cat_post = new WP_Query( array( 
    	'posts_per_page' => 1, 
    	'category__in' => array(7))
    	'post_type' => array(
    	'post',
    	'local-news',
    	'government-news',
    	'sports-news'
    	),
    	);
    unexpected T_CONSTANT_ENCAPSED_STRING

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Solved

    $cat_post = new WP_Query( array(
    'posts_per_page' => 1,
    'category__in' => array(7),
    'post_type' => array(
    'post',
    'local-news',
    'government-news',
    'sports-news'
    )
    ));


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •