first the problem, then the tries.
<h2>Problem</h2>
The problem is that i get a 404 NOT FOUND error if i visit another page than the first category page.
On the category page i have a normal pagination. The first site works. (<a href="http://mypage.com/category/properties" rel="nofollow noreferrer">http://mypage.com/category/properties</a>)
After i click on the "Next page" button I'm on the page <a href="http://mypage.com/category/properties/page/2" rel="nofollow noreferrer">http://mypage.com/category/properties/page/2</a> and got the error 404 NOT FOUND.
<strong>But why?</strong>
<h2>Tries</h2>
First I tried this Question <a href="https://stackoverflow.com/questions/8269713/custom-post-type-and-taxonomy-pagination-404-error">Custom Post Type and Taxonomy pagination 404 error</a>, but the
and the queries below doesnt work.
I tried this, too. <a href="http://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages" rel="nofollow noreferrer">http://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages</a>
But the query_posts try has the same result as the WP_Query try.
The event with the pre query i tried, too. But the problem is the same -.-
<h2>Example / PHP</h2>
<h2>Results</h2>
<strong>Page 1</strong>
<img src=" " alt="Page 1">
<strong>Page 2</strong>
<img src=" " alt="Page 2">
<h2>Problem</h2>
The problem is that i get a 404 NOT FOUND error if i visit another page than the first category page.
On the category page i have a normal pagination. The first site works. (<a href="http://mypage.com/category/properties" rel="nofollow noreferrer">http://mypage.com/category/properties</a>)
After i click on the "Next page" button I'm on the page <a href="http://mypage.com/category/properties/page/2" rel="nofollow noreferrer">http://mypage.com/category/properties/page/2</a> and got the error 404 NOT FOUND.
<strong>But why?</strong>
<h2>Tries</h2>
First I tried this Question <a href="https://stackoverflow.com/questions/8269713/custom-post-type-and-taxonomy-pagination-404-error">Custom Post Type and Taxonomy pagination 404 error</a>, but the
Code:
exclude_from_search
I tried this, too. <a href="http://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages" rel="nofollow noreferrer">http://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages</a>
But the query_posts try has the same result as the WP_Query try.
The event with the pre query i tried, too. But the problem is the same -.-
<h2>Example / PHP</h2>
Code:
<?php
/* /srv/www/mypage/wp-content/themes/twentythirteen/category-1.php */
global $wp_query;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array_merge($wp_query->query, array(
'posts_per_page' => 4,
'post_type' => 'property',
'post_status' => 'publish',
'meta_key' => 'property_typ',
'meta_value' => 'Rent',
'category_name' => null
));
$wp_query = new WP_Query($args);
echo '<ul>';
while (have_posts())
{
the_post();
echo '<li><a href="' . get_permalink(get_the_id()) . '">'
. get_the_title() . '</a></li>';
}
echo '</ul>';
echo paginate_links(array(
'base' => str_replace(99999, '%#%', esc_url(get_pagenum_link(99999))),
'total' => $wp_query->max_num_pages,
'format' => '?paged=%#%',
'current' => max(1, get_query_var('paged'))
));
<h2>Results</h2>
<strong>Page 1</strong>
<img src=" " alt="Page 1">
<strong>Page 2</strong>
<img src=" " alt="Page 2">