Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › All courses search box
Tagged: all courses, buddypress, search, Tag
- This topic has 11 replies, 2 voices, and was last updated 6 years, 2 months ago by Diana.
Viewing 12 posts - 1 through 12 (of 12 total)
-
AuthorPosts
-
August 8, 2018 at 10:40 am #171782dantwahSpectatorHi! I am trying to amend the search in wordpress so it also searches in tags that I have added to courses. This way it is easier for people to find what they are looking for. I have succesfully done so for the wordpress search. But for some reason the searchbox on the all courses page works differently and does not show the correct results. How is it possible that this searchbox works differently? How to edit it? I have used this piece of code to amend the search: https://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search/5404August 9, 2018 at 7:36 am #171893DianaParticipant@dantwah The code in the article is by select command. If the query is correct then it will definitely work fine. You have to check where these tags are stored in the database so you can modify your query according to that.August 9, 2018 at 7:49 am #171895dantwahSpectatorHi Diana, I am not completely sure if i understand you. I have added the code so that I should be able to search on tags. I have added a tag called "gekketag" to two courses. If I would search for this it should show up. On this page searching for "gekketag" does not work (https://minutenacademie.nl/blader-door-cursussen/ On this page searching for "gekketag" does work: https://minutenacademie.nl/testsearch/ Why doesn't it work on all courses page? How can i make this work on the all courses page too? Kind regards!August 10, 2018 at 6:40 am #172038DianaParticipant@dantwah, There is another option instead of adding custom code to search for course directory. Use the widget Tag Cloud and select the taxonomy there as Tag. So these are your unit tags which will appear in a sidebar on all courses page. Refer: http://prntscr.com/kgwwzj The module-tag page will show the units that are completed by the user in a course and belongs to that tag. Try completing a unit in a course that belongs to a tag and then accesses that tag. It will show you the unit content and the name of the course in which that unit is attached You cannot access the unit directly using the tag. These tags will only help students to find the content(it will show in which course this unit is)August 10, 2018 at 8:21 am #172053dantwahSpectatorHi Thanks for pointing out this option, however this is not what I am after. I just want the courses to be better searchable by adding tags and making them searchable on the all courses page. I don't want any tags clouds or widget, it should not be visible to the user, just showing up better search results. It is working for regular search, just not on the all courses page, i just don't understand why. I am guessing it may be because it is an AJAX search? Kind regardsAugust 10, 2018 at 1:02 pm #172098DianaParticipant@dantwah, The way you are trying to search through courses in all courses. I will explain you something here. In wplms system, to search using the unit tag, we have to first fetch the unit id associated with that tag, then the curriculum through which we can find the course id's. We have to use LIKE Query which is time-consuming The curriculum is saved as an array and the unit tag is a taxonomy. So if we implement this. It would crash your site. If you have more than 20 courses in future and let's say 25 students search at the same time then your site will not work. Instead of this, we can do that add a setting in course (course-unit tag). Here we have to select the tag and it will be searchableAugust 13, 2018 at 9:36 am #172241dantwahSpectatorHi Diana, I am sorry I may have not been so clear. I am not talking about UNIT tags. I have added a custom taxonomy to courses, so I am using COURSE tags. It is these tags that I want to make searchable on the all courses page! It works for the other search just not the one on the all courses page. I guess course tags would require a lot less consumption, or would this be problematic too? Kind regardsAugust 14, 2018 at 10:07 am #172366DianaParticipant@dantwah Yes, you are right. The course tags will not be problematic. It will work fine. Let me check the codeAugust 16, 2018 at 9:13 am #172555dantwahSpectatorGreat look forward to hearing if its possible :)!August 17, 2018 at 12:03 pm #172676DianaParticipant@dantwah, bp_directory_course_search_form (the code is in vibe course module/includes/bp-course-functions.php) This is the filter on which the search form on all courses page is working. So we have to add in course settings to select a course taxonomy and then execute the function using like sql query as you did on another page to modify this searchAugust 28, 2018 at 7:57 am #173858dantwahSpectatorHi, I tried constructing something, but I don't really see how this search is not already amended by the originial code. What makes it so different? (code: https://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search/5404)August 29, 2018 at 10:37 am #174027DianaParticipant@dantwah, We are planning to add this in our wplms 3.8 update. You can track the progress here. But you have to wait for this https://trello.com/c/p3cRib03/1704-issue-add-a-custom-taxonomy-support-in-course-directory
-
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
- The topic ‘All courses search box’ is closed to new replies.