Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.26, custom fields, meta_query, shortcode
- This topic has 3 replies, 2 voices, and was last updated 8 years ago by
Steven Zahm.
-
AuthorPosts
-
08/29/2018 at 5:37 pm #471103
Fuxia Jin
ParticipantI can do a list based on category, for example
[connections template="cmap" category=58]
I have a Custom Field called “Membership Type” – Golden/Siver/Bronze ; How can I do a list based on “Membership Type”
08/31/2018 at 8:51 am #471274Steven Zahm
Keymaster@ Fuxia
Maybe this will work for you?
[connections meta_query='{"meta_query":{"0":{"key":"Membership Type","value":"Golden","compare":"="}}}']Capitalization matter, so, you might have to change
Membership Typeand/orGoldenso it works.The
keyis the Custom FieldsNameand thevalueis the Value in the Custom Fields.Hope this helps!
09/15/2018 at 9:18 pm #472477Fuxia Jin
ParticipantThanks, the meta_query worked!
Is it possible to construct a meta_query with the condition ( Membership Type !=’Golden’ and Membership Type != ‘Silver’ ) ?
or is it possible to update database table directly to update “Membership Type” = ‘Bronze’ if “Membership Type” is not specified (is null)?
Fuxia
09/17/2018 at 12:06 pm #472688Steven Zahm
Keymaster@ Fuxia
RE: Is it possible to construct a meta_query with the condition
Yes, it should be. Change
"compare":"="to"compare":"!="in the same I gave.RE: is it possible to update database table directly to update “Membership Type” = ‘Bronze’ if “Membership Type” is not specified (is null)?
Yes, but not a within Connections. You could use a DB tool such as phpMyAdmin, usually available in your web host control panel. You would have to custom craft a query to update the table and its value.
Hope this helps!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
