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

Problems with wp_pagenavi within posts WordPress


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
which is fine!

But when you click on a video the url for clicking on page 2 changes to
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) ?>
$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');
<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>

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

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

'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(); } ?>
<?php wp_reset_query(); ?>

<?php get_footer(); ?>

Answers (1)


Gabriel Reguly answers:



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