WP-PageNavi not working properly on custom post

I have created a custom page that will display posts only from a specific category and i have also set wordpress to show only 4 number of post. Now the problem is the “WP-PageNavi” is not working properly. Here is the code.

<div class=“sixteen columns latest_post”>

<?php query_posts(‘cat=3’, ‘posts_per_page=-1=-’); if(have_posts()) : while(have_posts()) :the_post(); ?>
<div class=“sixteen columns alpha omega outer_box”>
<div class=“inner_box articles”>

<h3 class=“post-title”>" rel=“bookmark” title=“Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h3>

<ul class=“data”>
<?php the_author_posts_link() ?> /
<?php the_category(', ') ?> /
<?php the_time(‘F jS, Y’) ?> /
<?php comments_number() ?>


<div class=“align_thumbnail_right”>
<?php if ( has_post_thumbnail()) the_post_thumbnail(‘home-thumb’); ?>


<div class=“content”>
<!–TEXT –>
<?php the_excerpt(); ?>

"><span>Read More</span>



<?php endwhile; endif; >

<div class=“pagination”>
<?php wp_pagenavi(); ?>


I applied the plugin on the index page and it seems to be working fine. But when i tried it on a custom page it doesn’t work. Really hope that someone can help me here since i’m not really good at PHP