Forums Forums Search & Filter Pro Conditional Logic

Viewing 10 posts - 1 through 10 (of 14 total)
  • Trevor
    #135091

    True conditional logic is not an advertised feature of our plugin. However, it does support Quasi conditional logic, which is what most sites use.

    Let me take the example of your two taxonomies (they must be two separate taxonomies, and not one taxonomy with multiple parent/child relationships – if you have done this, it can easily be changed into two taxonomies); Provinces and Towns.

    When the page with the form opens, both fields would be visible, populated with all possible variations of terms.

    When the user makes a selection in the Province field, the Town field updates to show only the towns in that province. Also, if the user selects a town first, the Province field would update to show the correct province.

    This is done by:

    1. Enabling (ON) the two Auto Count settings in the General Settings tab, and
    2. On each field, set Hide Empty to ON.

    We do it this way because WordPress does not maintain referential data integrity in its database, which is what is required for True Conditional Logic (although it can be faked). Instead the ‘joins’ are in each post where you select terms for each field and thus create the ‘link’.

    Anonymous
    #135195
    This reply has been marked as private.
    Trevor
    #135461

    Can you first try setting that shortcode in a PHP do_shortcode function , like this:

    <?php do_shortcode('[pods name="advertisement" template="search"]'); ?>
    
    Anonymous
    #135469

    Ok I’ve made the change as you suggested but now we are back at only showing the title in the result instead of the image, name and location too. https://skillscoach.co.za/search-page/

    Trevor
    #135471

    Mmm. That means Pods must be using javascript to expand the shortcode. Is the content merely data from pods custom fields/taxonomies?

    Anonymous
    #135473

    Yes that is right, data from custom fields and taxonomies. I am happy to give you access to have a look?

    Trevor
    #135476

    Then if you are using our results.php, you can use php to print out the values individually:

    https://pods.io/docs/code/pods/field/

    https://codex.wordpress.org/Function_Reference/the_terms

    Anonymous
    #135478

    I tried that and I just could not get it to work – my knowledge of php is very limited, that’s why someone in Pods’ slack channel suggested using the shortcode. I didn’t realise it was going to be so complicated to get the same result you get in your demo video.

    Trevor
    #135483

    The ease by which you achieve the ‘look’ depends on the theme and Custom fields/taxonomies plugins you use.

    How far did you follow the results.php customisation guide?

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    Anonymous
    #135487

    ok great, thank you for the link. So that will mean it doesn’t get overwritten by an update.

    I am still confused as to why it loaded the posts as I want them to look (with the shortcode I added) on the results page but not after I do a search. Do I need to add my shortcode somewhere else to show the results like this too?

Viewing 10 posts - 1 through 10 (of 14 total)