Support

Account

Home Forums Add-ons Options Page using options page fields in functions.php Reply To: using options page fields in functions.php

  • Just wanted to add another update. Here’s my function:`function m1_core_feature_selection() {
    $include_albums = get_field('include_albums', 'option');
    if ( $include_albums === true ){
    include_once('lib/cpt_albums.php' );
    }
    }
    add_action('after_setup_theme', 'm1_core_feature_selection');
    `
    When I do a var_dump($include_albums) I get bool(true). I can uncheck the box and see the change to bool(false). If I remove the if ( $include_albums === true ) piece from the function it works.