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.
- This topic has 5 replies, 2 voices, and was last updated 9 years, 4 months ago by
Steven Zahm.
-
AuthorPosts
-
07/10/2014 at 11:32 am #296636
Michael
ParticipantI noticed an issue where if I go to a page with the category in the url i.e. domain.com/members/cat/accounting/
then I click the dropdown and pick another category, the URL gets changed to:domain.com/members/cat/accounting/?cn-s=&cn-cat=42
The issue is that I still only see the accounting entries because the /cat/accounting/ is still in the URL.
07/15/2014 at 10:48 am #297016Steven Zahm
Keymaster@ Michael
I’m guessing you’re using the the category widget (which uses the category permalinks) and a template with a drop down, like cMap. Yes? Honestly, right now, I can not think of anything of the top of my head where I could reconcile the two uses … maybe, perhaps …
Try adding
force_home='true'
to the shortcode. This trick may work as long as you’re using a single home page for your directory which I imagine your are if you are using the category widget.Let me know if that does the trick or not.
07/15/2014 at 12:30 pm #297024Michael
ParticipantIt doesn’t appear to.
Just so you know how I have things set up, I have three pages right now.
/members – This has the following shortcode:
[connections image_fallback=logo image=siteshot force_home='true']
This is also set as the connections home page./members-new/entries
[connections image_fallback=logo image=siteshot force_home='true']
This will be the new connections page, but it’s not set as the homepage yet./members-new
[connections_categories show_empty=0 force_home='true']07/21/2014 at 1:50 pm #297671Steven Zahm
Keymaster@ Michael
I know it’s been a few days, but I think I have a solution for you to try. Install the Code Snippets plugin. Add a new snippet with the following code:
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; } }
Basically this will globally search the db instead of being limited to the current category whether it is set by the category ID (used by drop down) or category slug (used by category shortcode). And if there is no search but both a category ID and a category slug, the category slug wins and the URL is redirected back to the directory home page filtering by the category selected in the drop down.
Let me know how it goes.
07/21/2014 at 1:55 pm #297672Michael
ParticipantExcellent. That does the trick.
07/21/2014 at 2:06 pm #297675Steven Zahm
Keymaster@ Michael
Great to hear! If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
http://wordpress.org/support/view/plugin-reviews/connections -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.