For some reason I'll only get the title for one custom post type, or the other and not both as specified in the $args. Any ideas as to why this could be happening?
[[LINK href="http://pastebin.com/iVHYEs69"]]Here's my code.[[/LINK]]
[[LINK href="http://wordpress.stackexchange.com/a/60715"]]Another example of exactly what's going on[[/LINK]], but I don't have WPML.
I tried uninstalling all plugins and turned errors on. No luck.
Thanks for your help!
Can you paste the code of the custom post type declaration ?
Both post types have published content ?
Try this to see all posts from the query.
$args = array(
'post_type' => array('videos','images'),
'posts_per_page' => -1 // show all posts
$Justified_Query = new WP_Query( $args );
<?php if ( $Justified_Query->have_posts() ) : ?>
while ( $Justified_Query->have_posts() ) :
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
Thank you Luis,
For some reason it now works. I was playing around with posts_per_page and a bunch parameters before. I did try that and it didn't work before. Now it strangely does and everything is working as it should? I'm confused to say the least.
Here's the code for my [[LINK href="http://pastebin.com/5C8W2Vs2"]]post types[[/LINK]] if you want to take a look. Maybe offer some suggestions as to what could of been going on because I'm still learning, so it will still help me to understand.
Thanks again for your help!
Well everything looks good, maybe a cache plugin ?
Did you flush the rewrite rules ?
You can also call both functions with one call.
flush_rewrite_rules(); // this should be called once (on plugin activation).
By default query post will display most recent posts, i think you may not have any new posts in other post type. Just try to add posts to both post types and check.