All courses search box

Home Forums Legacy Support Support queries How-to & Troubleshooting All courses search box

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #171782
    dantwah
    Spectator
    Hi! 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/5404
    #171893
    Diana
    Participant
    @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.  
    #171895
    dantwah
    Spectator
    Hi 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!
    #172038
    Diana
    Participant
    @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)
    #172053
    dantwah
    Spectator
    Hi 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 regards
    #172098
    Diana
    Participant
    @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 searchable
    #172241
    dantwah
    Spectator
    Hi 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 regards  
    #172366
    Diana
    Participant
    @dantwah Yes, you are right. The course tags will not be problematic. It will work fine. Let me check the code
    #172555
    dantwah
    Spectator
    Great look forward to hearing if its possible :)!
    #172676
    Diana
    Participant
    @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 search
    #173858
    dantwah
    Spectator
    Hi, 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)
    #174027
    Diana
    Participant
    @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
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘All courses search box’ is closed to new replies.