/ Published in: PHP
                    
                                        Query any Post Type anywhere
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 //when 'blog' is the custom post type $loop = new WP_Query( $args ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php endwhile; ?>
Comments
                    Subscribe to comments
                
                