Forums

Showing a list of custom post links? (2 posts)

  1. themoviemark
    Member
    Posted 8 months ago #

    I'm new to WordPress, and I'm doing my best to figure out how to use custom post types the way that I want. Here's what I'd like to do:

    1) Create a static "Movie Review" page that has some intro text. Below the text I would like a list of all my reviews, as well as the ability to search by actor, genre, etc.

    2) I created a "Movie Review" Custom Post Type in order to create individual movie reviews, but how do I identify that each individual movie review should be displayed in the list on the main review page?

    I'm a .NET programmer, and the way I typically do this is to have a page that displays a gridview that pulls from my "Movie review" table. I'm trying to adapt to a WordPress backend, and it seems like the process should be easier than this.

    Any help is appreciated!

  2. emke
    Member
    Posted 8 months ago #

    Read up on custom post types in the Codex - http://codex.wordpress.org/Post_Types - http://codex.wordpress.org/Post_Types

    It seems to me this would be easy:

    $args = array( 'post_type' => 'movies or whatever', 'posts_per_page' => 10 );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    	the_title();
    	echo '<div class="entry-content">';
    	the_content();
    	echo '</div>';
    endwhile;

Reply

You must log in to post.

About this Topic