Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 0.8.14, pagination
- This topic has 7 replies, 2 voices, and was last updated 11 years, 11 months ago by
Steven Zahm.
-
AuthorPosts
-
07/27/2014 at 11:20 am #298096
Craig
ParticipantI have listings with clickable cities and zip codes, and they work with no issues, but when there are multiple pages for a result the URL for extended pages adds unnecessary extra info into the URL, causing duplicate entries to be created and spidered by search engines.
For example:
If I click the city link to sort, if there are multiple pages, the first shows as /city/Raleigh/
But subsequent links give the following URL:
/city/Raleigh/pg/2/?cn-locality=Raleigh
/city/Raleigh/pg/3/?cn-locality=RaleighThese links function correctly if shortened to simply
/city/Raleigh/pg/2/
/city/Raleigh/pg/3/But as the links are generated with the extra info, they get spidered that way by search engines. Is there a simple way to correct the URLs?
Thanks,
Craig07/27/2014 at 11:00 pm #298138Craig
ParticipantOne additional note. The plugin creates duplicate pages for all multipage queries.
Any page that has multiple pages will have the following 2 pages created:
/city/Raleigh/
/city/Raleigh/pg/1/Both are the same page, which can cause headaches with search engines which will see these pages as duplicate content.
07/27/2014 at 11:25 pm #298139Craig
ParticipantThis reply has been marked as private.07/28/2014 at 9:50 am #298193Steven Zahm
Keymaster@ Craig
Not a pain at all! It seems I broke something along the way when navigating from a Connections category link to a template which uses query vars for navigation. Ironically, I think it was when I converted the pagination links to be pretty permalinks instead of query vars (for better seo). I don’t recall testing from a Connections category permalink. I think I know exactly where the issue lies …. fixing it will present a challenge.
The pagination code is up for a rewrite on the next major release. And now with this has become number one priority for that release. I’ll get on this ASAP and see if I can’t roll this into a bugfix release rather than waiting for the next major release.
I’ll get back to you as soon as I have a working solution… Actually would you be willing to let me test on your site? Also, what tool are you using to crawl your site.
07/28/2014 at 12:47 pm #298244Craig
ParticipantThis reply has been marked as private.08/04/2014 at 8:21 am #299488Steven Zahm
Keymaster@ Craig
I developed a snippet for another user that may help with this issue a little.
Install the Code Snippets plugin and add the following code as a new snippet.
add_action( 'wp', 'cn_search_category_reset' ); function cn_search_category_reset() { global $wp_rewrite, $post; $keywords = get_query_var( 'cn-s' ); $categoryIDs = get_query_var( 'cn-cat' ); $categorySlug = get_query_var( 'cn-cat-slug' ); if ( ! empty( $keywords ) && ( ! empty( $categoryIDs ) || ! empty( $categorySlug ) ) ) { cnSEO::doFilterPermalink( FALSE ); // Get the directory home page ID. $homeID = cnSettingsAPI::get( 'connections', 'connections_home_page', 'page_id' ); $permalink = $wp_rewrite->using_permalinks() ? trailingslashit( get_permalink( $homeID ) ) : get_permalink( $homeID ); wp_redirect( add_query_arg( array( 'cn-s' => $keywords, 'cn-cat' => FALSE, 'cn-cat-slug' => FALSE ), $permalink ) ); exit; } elseif ( ! empty( $categoryIDs ) && ! empty( $categorySlug ) ) { cnSEO::doFilterPermalink( FALSE ); // Get the directory home page ID. $homeID = cnSettingsAPI::get( 'connections', 'connections_home_page', 'page_id' ); $permalink = $wp_rewrite->using_permalinks() ? trailingslashit( get_permalink( $homeID ) ) : get_permalink( $homeID ); wp_redirect( add_query_arg( array( 'cn-cat' => $categoryIDs, 'cn-cat-slug' => FALSE ), $permalink ) ); exit; } }I will not do much about the pagination links but it should help clear up the issue of clicking the category link in the sidebar and then changing the category in the drop down… in case you would like to use that again.
08/04/2014 at 8:24 am #299490Steven Zahm
Keymaster@ Craig
Oh, thanks for sharing the tool you use. I’ll have to shop around and see if I can find one for myself. I think running it on my site will help me catch these errors in the future.
08/25/2014 at 12:50 pm #301874Steven Zahm
Keymaster@ Craig
I’ve eliminated the bug with paginations reported in this comment. You’ll no longer have multiple pages for page 1 when there are multiple pages of entries.
-
AuthorPosts
- You must be logged in to reply to this topic.
