Pagination Duplicate

Hi All,

I need some help here… does any here experience this issue on WordPress…
It works fine though but the fields on the url is being duplicate…

here’s an example of what I’m talking…
http://my-site.com/advance-search/page/2/?status=for-sale&bath=2#038;bath=2

I want it to be a clean link like this below

http://my-site.com/advance-search/page/2/?status=for-sale&bath=2

I am not sure why it adds this -> #038;bath=2

I appreciate anyone can help me on this…
Thanks

show us your code for the pagination and we can help :wink:

there could be 101 reasons why that is happening

my pagination code is the same as you see at codex page…

<?php
global $wp_query;

$big = 999999999; // need an unlikely integer

echo paginate_links( array(
	'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
	'format' => '?paged=%#%',
	'current' => max( 1, get_query_var('paged') ),
	'total' => $wp_query->max_num_pages
) );
?>

okay so then something is modifying the code then, either in the functions.php or a plugin, disable all plugins and see if it continues.

I tried using other pagination code here -> http://sgwordpress.com/teaches/how-to-add-wordpress-pagination-without-a-plugin/ and it displays without #038;bath=2 their might be something on this function paginate_links() I’m really stuck on this… :slight_smile:

nothing wrong with the function, I have added it too 3 themes in the last 2 days, it’s likely an issue on your setup as I said, start with plugins and then look at htaccess.

Thanks… I deactivated all the plugins but the same results… their might be something in my form I think…

I solved it… If anyone wants it… here’s my code below :slight_smile:

 <?php
global $wp_query;

$big = 999999999; 
$search_for   = array( $big, '#038;' );
$replace_with = array( '%#%', '' );

echo paginate_links( array(
	'base' => str_replace( $search_for, $replace_with, esc_url( get_pagenum_link( $big ) ) ),
	'format' => '?paged=%#%',
	'current' => max( 1, get_query_var('paged') ),
	'total' => $wp_query->max_num_pages
) );
?>