This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Language Settings

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #16739
    leonhardtmleonhardtm
    Participant

    Hi 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

    #16741
    leonhardtmleonhardtm
    Participant

    Hi 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

    #16744
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi 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.

    #16745
    leonhardtmleonhardtm
    Participant

    Hi Ernest,

    thanks! Will try this.

    Best regards, Mario

    #16769
    leonhardtmleonhardtm
    Participant

    Hi 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

    #16776
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thanks 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.

    #16785
    leonhardtmleonhardtm
    Participant

    Hi 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

    #16786
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #16787
    leonhardtmleonhardtm
    Participant

    Will definitely give you a positive rate!

    Best, Mario

Viewing 9 posts - 16 through 24 (of 24 total)
  • The topic ‘Language Settings’ is closed to new replies.