Tag Info

Hot answers tagged

2

I believe you are on the right track with your second idea there, but you have some syntax errors with your conditional. In PHP all of your logic should be wrapped inside one set of ( ) for your conditional. Try this: <?php if ( get_field('website') || get_field('emailaddress') ) { ?> <footer> <?php if ( ...


1

The problem is that by default WordPress only looks in the title and content field. As you build your pages from multiple pieces of external post types the default query doesn't find those parts. Before we go any further I want you to know that this is going to be quite involved as you need to modify the search query quite a lot. I therefore also can't code ...


1

The get_field_object() function requires the field KEY not the field NAME. See docs: http://www.advancedcustomfields.com/resources/functions/get_field_object/ So it should looks something like this... $field = get_field_object('field_53d27f5599979'); $value = get_field('field_myfield'); $label = $field['choices'][ $value ]; You can find the field key by ...



Only top voted, non community-wiki answers of a minimum length are eligible