• Is there a way to create a landing/listing page for custom post types?

    For instance, if I have a post type of “Movies”, can I have a https://website.com/movies be a paginated page that lists 10 movies at a time; something like to a category page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Using the Twenty Ten Theme, a custom post type of books, the code below in a Page Template, and a Page called “A List Of Books”, with the Template below assigned as the Template for that Page.

    <?php
    /**
     * Template Name: Page of Books
     *
     * Selectable from a dropdown menu on the edit page screen.
     */
    ?>
    
    <?php get_header(); ?>
    
    		<div id="container">
    			<div id="content">
    <?php
    $type = 'book';
    $args=array(
      'post_type' => $type,
      'post_status' => 'publish',
      'paged' => $paged,
      'posts_per_page' => 10,
      'caller_get_posts'=> 1
    );
    $wp_query = null;
    $wp_query = new WP_Query($args);
    ?>
    <?php
    
     get_template_part( 'loop', 'index' );?>
    			</div><!-- #content -->
    		</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Above example now in the Pages article.

    Is it possible to create a landing page or squeeze page (or post) with twenty ten where there are no menues or have it display a custom menu?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Type Landing Page’ is closed to new replies.