• Resolved andersj

    (@andersj)


    Hi,

    I have a custom field (committee_program) in a pod group (committee).

    committee_program is a simple custom defined relationship field with 2 values (1 being what you see in the where clause).

    My params were working until I added my where clause>

    $params = array(
    				'limit' => -1,
    				'orderby' => 'post_title ASC',
    				'where' => "committee_program = 'COPPUL Digital Stewardship Network'"
    			);

    Thanks for your help in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @andersj

    In this case the contents of that field need to be an exact match.
    What kind of field are you using?

    Cheers, Jory

    Thread Starter andersj

    (@andersj)

    Hey @keraweb,

    Same problem but I don’t need it in the use earlier provided. Now I’m trying to do this with a pod named faq:

    $params = array(
    				'limit' => -1,
    				'orderby' => 'post_title ASC',
    				'where' => "faq_type = 'Default'"
    			);

    faq_type is a custom relationship field (simple) with the options of Default and SPAN.

    Thread Starter andersj

    (@andersj)

    Solved it by adding a .meta_value after the field name!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @andersj

    Ah right, sorry, I should’ve seen that from the start.
    Glad to hear you’ve solved it!

    Cheers, Jory

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘where clause in fetch params’ is closed to new replies.