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 17 replies, 2 voices, and was last updated 9 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
10/08/2016 at 12:11 pm #394744
ssnoomann
ParticipantHi Steven,
We have our directory up and running now and have been working out the kinks. As you may recall, we had setup the image grid on the enhanced categories extension, while at the same time using the category dropdown.
Well, after doing a bunch of forum searches and topic reads, I have learned that you can’t use both the category dropdown in conjunction with either the category link or the image grid. It took me awhile to figure out why I could navigate to one category and then try to get to another, it just stayed on the same page.
This is of course because both the category links and image grid use the permalink structure while the category dropdown uses a non-permalink style. So, when on a permalinked category page trying to get to another using the category dropdown, all it does is add the string of code onto the end of the permalink url, thereby staying on the same page. I tried adding the home id to the connections string but that did not help.
In one topic you mentioned that you could not use both together at the same time. I assume that there is no way to get the category dropdown to use the permalink structure. This is the preferred method and best for SEO.
-
This topic was modified 9 years, 10 months ago by
ssnoomann.
10/08/2016 at 12:13 pm #394745ssnoomann
ParticipantThis reply has been marked as private.10/09/2016 at 5:44 pm #394877ssnoomann
ParticipantThis reply has been marked as private.10/09/2016 at 5:50 pm #394879ssnoomann
ParticipantThis reply has been marked as private.10/12/2016 at 10:16 am #395380Steven Zahm
Keymaster@ ssnoomann
Ok, I read through this a couple times… is this pretty much resolved or or there something specific remaining that you would like help with?
10/13/2016 at 7:33 pm #395734ssnoomann
ParticipantThis reply has been marked as private.10/14/2016 at 10:00 am #395794Steven Zahm
Keymaster@ ssnoomann
re: One of the things they do is Yoga. Their business name and other searchable fields do not contain the word ‘yoga’. So, when I search for yoga their business does not show up in the results. They are categorized under ‘Yoga & Meditation’ but the search function does not search categories. Is there a way around this?
Install the Code Snippets plugin create a new snippet with the following code.
function cn_search_category_description($scored, $terms) { global $wpdb; $select = array(); $from = array(); $joun = array(); $where = array(); $select[] = 'entry_id'; $from[] = CN_TERM_RELATIONSHIP_TABLE . ' tr'; $join[] = CN_TERM_TAXONOMY_TABLE . ' tt ON tr.term_taxonomy_id = tt.term_taxonomy_id '; $where[] = $wpdb->prepare('MATCH (description) AGAINST (%s IN BOOLEAN MODE)', $terms); $sql = "SELECT " . implode( ',', $select ) . " FROM " . implode( ',', $from ) . " JOIN " . implode( ',', $join ) . " WHERE " . implode( ' AND ', $where ); $ids = $wpdb->get_results( $sql, ARRAY_A ); if ( ! empty( $ids ) ) $scored = array_merge( $scored, $ids ); return $scored; } add_action('cn_search_scored_results', 'cn_search_category_description', 1, 2);Save and Activate the snippet. Now searches will include the category field description.
re: Can the search function not reset itself to the root URL rather than just searching from however many levels down you may already be in the directory?
Hmmm… that is a bug. The search should be from the permalink root and not the category tree. I’ll look into and ensure that is addressed in the next update.
10/14/2016 at 11:00 am #395806ssnoomann
ParticipantI have added the code snippet and activated for front-end only as per the attached screenshot. I have cleared cache and they are still not showing up in the results for ‘yoga’.
Attachments:
You must be logged in to view attached files.10/14/2016 at 11:09 am #395808Steven Zahm
Keymaster@ ssnoomann
- Make sure the snippet is actually activated. There are two buttons, Save and Save and Activate.
- Did you update the category description to include the word yoga?
10/14/2016 at 11:26 am #395809ssnoomann
ParticipantSilly me. I didn’t activate it at that point… So I activated it.
No, I hadn’t added any descriptions for categories. So, I just added the word yoga as the description for that category, cleared cache and they’re not showing up.
That ‘Yoga & Meditation’ sub-cat has a parent category, so I also added the word ‘yoga’ to that description, same result.
Attachments:
You must be logged in to view attached files. -
This topic was modified 9 years, 10 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
