Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Problems with wp_pagenavi within posts WordPress

  • REFUNDED

Hey guys,

I have a problem with wp_pagenavi. It works fine on my main page but I want to use it in the posts section.
It is basically a problem of rewriting the url. I must say I'm not to familiar with programming but I know my way around to modify templates, but at this point I'm really stuck. I hope someone can lead me the way...

So at the moment the front page has 15 videos. When you want to go to page 2 wp_pagenavi is directing it to http://www.berlin-loc.de/?paged=2
which is fine!

But when you click on a video the url for clicking on page 2 changes to
e.g.
http://www.berlin-loc.de/?portfolio=mexx-magnetic&paged=2
which will, of course, lead not to page 2

So my question is how can i tell wp to drop "portfolio=mexx-magnetic&"

Here is the code of the single page:

<?php get_header(); ?>

<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>

<div class="container clear">
<div class="content">
<div id="show">
<?php echo get_post_meta($post->ID, 'movie', true) ?>
<?php
$args = array(
'post_type' => 'attachment',
'orderby' => 'menu_order',
'order' => ASC,
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID,
'exclude' => get_post_thumbnail_id()
);
$attachments = get_posts($args);
if ( $attachments ):
foreach ( $attachments as $attachment ):
echo wp_get_attachment_image($attachment->ID, 'full');
endforeach;
endif;
?>
</div>
</div>
<div class="l_col">
<div class="post_portfolio">
<h2><?php the_title(); ?></h2>
<p class="post_divider"></p>
<div class="post_text"><?php the_content(); ?></div>
</div>
</div>
</div>

<?php endwhile;?>
<?php endif; ?>

<?php
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
$paged = get_query_var('page') ? get_query_var('page') : 1;

query_posts(
array(
'post_type' => 'portfolio',
'works' => $term->slug,
'posts_per_page' => 15,
'post__not_in' => array($post->ID),
'paged' => get_query_var('page'),
)
);
?>
<?php get_template_part('loop-portfolio'); // Loop template for portfolio (loop-portfolio.php) ?>

<div class="pagefront">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div>
<?php wp_reset_query(); ?>
</div>

<?php get_footer(); ?>


Answers (1)

2011-12-10

Gabriel Reguly answers:

Hi,

$1?

Sorry, it is not likely you that will get any answer at all.

Regards,
Gabriel