• Resolved sakarya

    (@sakarya)


    Hello..

    I’m tring to using OptionTree framework. But, I need help.

    I created custom post types and I want to control them with theme options panel.

    If user want to use one of them, he must activate it from options panel, but I can’t control it. For control using on/off button.

    Functions.php: Functions.php

    How can I check the button is on or off?

    OptionsPanel works very well.

    Thanks.

    https://ww.wp.xz.cn/plugins/option-tree/

Viewing 1 replies (of 1 total)
  • Plugin Author Derek Herman

    (@valendesigns)

    The on off switch is either set to on, off, or null. You wold need to add an if statement checking if the value of your theme option is equal to on and then add your custom post type.

Viewing 1 replies (of 1 total)

The topic ‘On/Off button Control in functions.php’ is closed to new replies.