0

I am using a plugin in my theme options. I copied the entire plugin directory in my child theme directory and correctly included all the files in the theme functions.php. The plugin options files is something like (file name is admin-config.php)

<?php


$wlcmsShortName = "wlcms_o";


global $submenu;

$wlcmsOptions = array(
    array( "name" =>  "Whitddde Label CMS Options", "type" => "title"),
    array( "name" => "Dasboard", "type" => "section"),
    array( "type" => "open"),
    array( "name" => "Admin Bar", "type" => "subtitle")
);

if ( version_compare( $wp_version, '3.2.5', '>=' ) )

{
    $wlcmsOptions[] = array(
            "name"  => "Hide WordPress Logos",
            "desc"  => "Hide WordPress logo from the admin bar and home icon",
            "id"    => $wlcmsShortName."_hide_wp_adminbar",
            "type"  => "radio",
            "options" => array("1", "0"),
            "std"   => 0);
    $wlcmsOptions[] =   array(
            "name"  => "Add Your Logo (16px x 16px)",
            "desc"  => "Adds a 16px logo to the admin bar",
            "id"    => $wlcmsShortName."_adminbar_custom_logo",
            "class" => 'upload_image_button',
            "type"  => "file",
            "std"   => '');
/*... plus all other arrays....*/

Now in my theme options callback function I tried to include this options page. I tried

 function file_callback(){
    get_template_part('admin-config');
echo 'just testing';
    }

Now in my theme options I am getting this text just testing and nothing from the template which I called. How I can fix this?

PS: I am bringing all the functions of White Label CMS in my child theme options page.

1 Answer 1

0

Not sure it is the best idea to try to run a plugin "in" your theme like this - it won't get updated as the plugin is updated.

You say you have "included all the files" from the plugin, but now you are trying to call admin-config.php with get_template_part when it is not a template - it should probably just be included.

Plus, this file looks like a config for an options framework, it probably does not actually create any output like the plugin admin page would. If you want output you will have to dig deeper into the plugin to see what creates that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.