Well, I got it to work! Keep in mind I'm just trying to paginate my index.php. Here's what I did:
I made these changes to wp-pagenavi.php
#1 where you find this line:
previous_posts_link($pagenavi_options['prev_text']);
Replace it with:
if ( clean_url(get_pagenum_link()) == "
http://www.qbgarage.com/" ) {
echo '<a href="'.clean_url(get_pagenum_link()).'index.php'.'" title="'.$page_text.'">'.$pagenavi_options['prev_text'].'</a>';
} else {
previous_posts_link($pagenavi_options['prev_text']);
}
#2 where you find this line:
echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a>';
Replace it with:
if ( clean_url(get_pagenum_link($i)) == "
http://www.qbgarage.com/" ) {
echo '<a href="'.clean_url(get_pagenum_link($i)).'index.php'.'" title="'.$page_text.'">'.$page_text.'</a>';
} else {
echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a>';
}
#3 Where you find this line...(which comes first in the wp-pagenavi.php file...)
echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'">'.$first_page_text.'</a>';
Replace it with:
if ( clean_url(get_pagenum_link()) == "
http://www.qbgarage.com/" ) {
echo '<a href="'.clean_url(get_pagenum_link()).'index.php'.'" title="'.$page_text.'">'.$page_text.'</a>';
} else {
echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'">'.$first_page_text.'</a>';
}
Obviously, this is just hard-coded for my URL, but you get the picture. I am not entirely sure that #3 is necessary because it wasn't clear to me when that link was created. But what I did was to check the value returned by get_pagenum_link() and if it was the same as the blog address, just tack on index.php. I made no modifications to get_pagenum_link() which is in wp-includes/link-template.php in case anyone is looking for it.
What do you think?