osclass

How to use Helper functions in custom page


I have created an ABC.php file in mytheme folder. Everything works fine but when I use some helper function in it for example <?php echo osc_current_web_theme();?>it do not produce desired output.

The ABC.php page will be called via ajax when need so I do not need complete header and footer.


Solution

  • Adding the following code at the top of the php page will make available helper functions of osclass for this php page.

    <?php
        define('ABS_PATH', dirname(dirname(dirname(dirname(__FILE__)))) . '/' );
        require_once ABS_PATH . 'oc-load.php';
    ?>