{"id":6031657,"date":"2015-04-19T19:06:28","date_gmt":"2015-04-19T19:06:28","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/hiding-empty-fields-1\/"},"modified":"2016-08-24T14:56:16","modified_gmt":"2016-08-24T14:56:16","slug":"hiding-empty-fields-1","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/hiding-empty-fields-1\/","title":{"rendered":"Hiding empty fields"},"content":{"rendered":"<p>Hi, why is it not possible for me to hide the button field, if it&#8217;s empty? <\/p>\n<p>This is how I do with the rest of the custom fields. But the button field will not cooperate.<\/p>\n<pre><code>&lt;?php if( get_field(&#039;field_name&#039;) ): ?&gt;\n\t&lt;p&gt;My field value: &lt;?php the_field(&#039;field_name&#039;); ?&gt;&lt;\/p&gt;\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>Thanks \ud83d\ude42<\/p>\n<p>https:\/\/wordpress.org\/plugins\/acf-button-field\/<\/p>\n","protected":false},"template":"","class_list":["post-6031657","topic","type-topic","status-closed","hentry","topic-tag-empty","topic-tag-field","topic-tag-get","topic-tag-hiding"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6031657","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\/6031657\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6031657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}