Now /custom will only pull in posts from the custom post type we created. 'my-custom-post', 'orderby' => 'menu_order', 'order' => 'ASC' ) $custom_query = new WP_Query ( $args ) while ( $custom_query -> have_posts ( ) ) : $custom_query -> the_post ( ) ?> " > The original loop we used looked like this: According to the WordPress template hierarchy, a page-name.php will override page.php. I'm going to create page-custom.php, and copy the code over from page.php. Right now, my page is pulling from page.php, like all the other pages. I created a page called Custom, which will appear at /custom. I've decided I'm going to make a new page for the custom post to loop in.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |