I've some custom publish types, for example 'review'. I can not appear to discover steps to make a piece (e.g., www.mysite.com/reviews/) which works such as the blog webpage, but lists reviews rather than posts (with pagination and everything). Let me make use of a separate template for this too.

You need assistance getting .htaccess to transform your groups into hard Web addresses. I figured Wordpress did this instantly so you will want to look and make certain you've setup your directory permissions on Wordpress therefore it can email your .htaccess file.

Please read this guide and it'll be removed up.

Produce a page known as reviews after which produce a new template inside your theme folder known as page-reviews.php. Add all of the necessary elements towards the template and can include a question_posts before your publish loop. It will seem like this:

<?php query_posts("post_type=reviews"); ?>
    <?php if (have_posts()) :?>
    <?php while (have_posts()) : the_post(); ?>        
        <div class="post" >
            <h2><a href="<?php the_permalink() ?>" ><?php the_title(); ?></a></h2>                     
            <?php the_content(); ?>     
        </div><!-- Post ends -->
    <?php endwhile; ?>
    <?php else: ?>
    <p>Sorry, we could not find what you were looking for</p>
    <?php endif; wp_reset_query(); ?>

Duplicate the file inside your theme known as "single.php" and relabel it to "single-reviews.php"

Since "single.php" can be used for the regular posts, you are able to append the title from the custom publish type towards the finish of "single-" to instantly use that.

Now once within the file "single-reviews.php" you are able to adjust design to become how ever you would like.

When you get a 404 error, or it's not demonstrating the right layout, you may want to flush the rewrite rules. This can be done two ways.

  1. Visit the permalinks page inside your after sales and it'll sometimes auto flush them.

  2. The easiest method to get it done is within your "functions.php" file inside your theme directory add the next code:

    add_action ( 'init', 'flush_rewrite_rules' )

    function flush_rewrite_rules() wordpress_rewrite $wordpress_rewrite->flush_rules()

Produce a new page known as reviews. Produce a new page template that calls the custom publish type. Assign the page template towards the page...