Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Language Settings
- This topic has 23 replies, 2 voices, and was last updated 8 years, 3 months ago by
leonhardtm.
-
AuthorPosts
-
February 12, 2018 at 11:40 am #16739
leonhardtm
ParticipantHi Ernest, thanks for this!
Posts/Pages without categories selected should not display.
The user should be able to select a category (like in the screenshot “erotische Hypnose”) and only pages with “erotische Hypnose” selected should show up / be displayed.
Do you think the code works for this?
Best regards, Mario
February 12, 2018 at 12:01 pm #16741leonhardtm
ParticipantHi Ernest, to make it more visible again:
I am choosing “Hörbuch” as a category (screenshot1)
and the pages that are listed do not contain this category (not selected; see: screenshot 2)These pages should be excluded from the list thoiugh and not show up because no category is selected. If nothing in the categories is selected they should disappear in the results.
Its the only way I found to be able to filter the pages by categories…
Regards, Mario
February 12, 2018 at 12:20 pm #16744Ernest Marcinko
KeymasterHi Mario,
I believe that custom code with the configuration provided should do the trick in this case. When a category is selected, those pages will be excluded, as they don’t have any category.
February 12, 2018 at 12:22 pm #16745leonhardtm
ParticipantHi Ernest,
thanks! Will try this.
Best regards, Mario
February 13, 2018 at 5:54 am #16769leonhardtm
ParticipantHi Ernest!
thanks again! It almost works, however the pages with the unselected categories (in the WordPress backend) still show up together with the pages that have a category selected even if the two checkboxes are unchecked in the Frontend (the logic should be that with both checkboxes unchecked in the Frontend only the pages that have no selected category in the Backend show up for the user; if a user changes his mind and selects a category in the Frontend than only the pages with the category selected in the WordPress backend should show up)
Regards, Mario
February 13, 2018 at 11:35 am #16776Ernest Marcinko
KeymasterThanks for the response, I believe I have a final solution, I understand everything now.
1. Change the advanced configuration to this: https://i.imgur.com/jXS8Rh6.png
2. Remove the previous code, and use this one instead:This will still exclude everything if unchecked, but allow the items with no categories selected.
February 14, 2018 at 12:32 pm #16785leonhardtm
ParticipantHi Ernest,
thanks again! This helped me solve it! Almost thought that it won`t work but does exactly what it should do to filter it.
Best regards, Mario
February 14, 2018 at 12:34 pm #16786Ernest Marcinko
KeymasterYou cannot access this content.
February 14, 2018 at 12:37 pm #16787leonhardtm
ParticipantWill definitely give you a positive rate!
Best, Mario
-
AuthorPosts
- The topic ‘Language Settings’ is closed to new replies.