I have tried many solutions to no avail and really need some help.
I have a Custom Post Type named "Portfolio" that is setup to display it's contents on a page called Portfolio.php. Wp PageNavi is hardcoded into the template and works fine under the Default permalink structure. When I try to switch permalinks to /%postname%/ and the URL becomes http://www.site.com/folder/portfolio/page/2/ it throws a 404.
Here is my code:
<?php //query_posts('paged='.$paged);
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('showposts=10'.'&paged='.$paged);?>
<?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 6, 'paged' => $paged)); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php $custom = get_post_custom($post->ID);
$screenshot_url = $custom["screenshot_url"][0];
$website_url = $custom["website_url"][0];?>
<div id="portfolio-item">
<h1><?php the_title(); ?></h1>
<a href="<?=$website_url?>"><?php if ( function_exists( 'get_the_image' )){get_the_image( array( 'custom_key' => array( 'post_thumbnail' ), 'default_size' => 'full', 'image_class' => 'alignright', 'width' => '280', 'height' => '187' ) ); }?> </a>
<?php the_excerpt(); ?>
</div>
<?php endwhile; ?>
</div>
<div class="navigation">
<?php include('includes/wp-pagenavi.php');
if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div>
By everything I've read in the last few days I assume I need to either change the name of the page other than the name of the post type (which I don't think it would matter) or there is some rewrite rule I need to be adding. I've reset all the posts in the portfolio, and reset the permalinks many many times, Default always works but anything else breaks the following pages. What am I missing here?