Integrating with new 'Tweet' post type
-
Hi there. I’ve been using this plugin for a month or so now and it has been a lifesaver, so thanks to the developer. In the latest version it gives the option of importing as a custom post type rather than as a post which I would like to integrate so that my posts aren’t overly saturated by Tweets.
How would I test for this post type in my templates? I usually use the Custom Post Type UI plugin where the syntax would be:
$args = array( 'post_type' => 'tweet' ); $tweets = new WP_Query($args); if($tweets->have_posts()) { while ($tweets -> have_posts()) : $tweets->the_post(); get_template_part('partials/tweet', 'post'); endwhile; wp_reset_query(); } else { //Get normal posts }
However, it doesn’t look like this syntax works in this case. Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Integrating with new 'Tweet' post type’ is closed to new replies.