Support

Account

Home Forums Add-ons Options Page Show group fields from an options page

Helping

Show group fields from an options page

  • Hoping I can get some help with code. Basically I have an options page which has a group field (‘page-ad’) which I want to display on pages.

    The fields are:
    ‘image’
    ‘heading’
    ‘sub_heading’
    ‘button_text’
    ‘button_link’

    I have searched here and everywhere, read up loads, tried different examples but haven’t been able to get this to work. Any ideas please?

    Thanks

  • You should probably rename page-ad to page_ad first

    Then I think something like the following should work:

    
    $group = get_field( 'page-ad', 'option );
    $subHeading = $group['sub_heading'];
    
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Show group fields from an options page’ is closed to new replies.