Skip Navigation

[Résolu] Use of a Views as a select inside a Forms don't work id additional parameters de

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Marqué : 

This topic contains 17 réponses, has 2 voix.

Last updated by Shane Il y a 10 mois et 2 semaines.

Assigned support staff: Shane.

Auteur
Publications
#1768403

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

I cannot give an answer whether this is something that would be possible in the near future, however what I can do is make the request. It is up to the development team to approve it.

However the issue is on the side of Toolset Forms and the nested shortcodes breaking the expected input.

Thanks,
Shane

#1773531

Pat

Ok Shane, I understand.

I have another question : how do I structure my hook to use several queries inside (ie: the idea here is to use the hook for all needed filtering parameters).
The Views is related to products and I have several custom fields to manage :
_stock, wpcf-annule, wpcf-type-evenement and wpcf-annee-univers
All these custom fields belong to product and could be retrieved from the database.
Regards
Pat

#1773621

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Given that you will be checking against the post type meta then you will need to do a meta query.

So the meta query would look like this.


$args = array(
    'post_type'  => 'product',
    'meta_query' => array(
        'relation' => 'OR',
        array(
            'key'     => 'color',
            'value'   => 'blue',
            'compare' => 'NOT LIKE',
        ),
        array(
            'key'     => 'price',
            'value'   => array( 20, 100 ),
            'type'    => 'numeric',
            'compare' => 'BETWEEN',
        ),
    ),
);

This is just an example from the wordpress documentation.

Please let me know if this helps.
Thanks,
Shane