{"id":15661211,"date":"2022-05-19T16:46:42","date_gmt":"2022-05-19T16:46:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/conditional-logic-within-shortcode\/"},"modified":"2022-05-19T16:46:42","modified_gmt":"2022-05-19T16:46:42","slug":"conditional-logic-within-shortcode","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/conditional-logic-within-shortcode\/","title":{"rendered":"Conditional logic within shortcode"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Is it possible to use conditional logic with the [pods] shortcode?<\/p>\n<p>I want a way to only display the field value if there is content in it. Ie. if the field is null\/empty, don&#8217;t display anything.<\/p>\n<p>Something like this was my attempt:<br \/>\n[pods name=&#8221;bank_account&#8221; id=&#8221;{{ post.id }}&#8221; where=&#8221;standard_interest_rate!=null&#8221;]{@standard_interest_rate}%[\/pods]<\/p>\n","protected":false},"template":"","class_list":["post-15661211","topic","type-topic","status-publish","hentry","topic-tag-condition","topic-tag-shortcode"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15661211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15661211\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15661211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}