Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been searching this subject for some time now, not finding a solution. First of all, sorry for my bad spelling. Im quit new to PHP, so please be gental.

Im using this to list some customfields:

$my_query = new WP_Query(array(

while ($my_query->have_posts())

    $emne = get_field( "emne" );
    $titel = get_field( "titel" );
    $forfatter = get_field( "forfatter" );
    $billede = get_field( "billede" );
    $land = get_field( "om_foredragsholder" );

    { ?>

    <a href="<?php the_permalink(); ?>" style="cursor:pointer;">
    <div class="content-holder-whitebox">
        <div class="whitebox">
            <div class="left">
                <h2><?php echo $emne ?></h2>
                <div class="title">"<?php echo $titel ?>"</div>
                <div class="navn"><?php echo $forfatter ?></div>
                <div class="mere-info">Mere info</div>
             <div class="right">
             <div class="billede">
                    <img src="<?php echo $billede ?>" />
                    <div class="knap">
                    <img src="<?php bloginfo('template_directory'); ?>/images/booknu.jpg" />



Please, can some one help me getting working? I have installed the plugin WP-PageNavi.

Thank you so much.

share|improve this question

1 Answer 1

Try this one you need to add 'paged' => get_query_var('page') so your code in $my_query should be like this

$my_query = new WP_Query(array(
    'paged' => get_query_var('paged')

You just need to pass along the ‘paged’ query var from the main query:

You can see also Codex page on query_posts()

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.