Support » Plugins » Echo values from theme options page onto home.php

  • I’ve built a custom theme options page where users can input the category id values of the specific categories that they want to display on the homepage. I’m having trouble with the PHP syntax needed to echo the values onto the page. I want to replace “3” below….

    <?php query_posts('showposts=1&cat=3'); ?>
    <h6 class="category_head"><?php wp_list_categories('include=3&title_li=&style=none'); ?></h6>

    …with the “std” value in the following array:

    $themename = "Theme Name";
    $shortname = "tn_";
    $options = array (
        array(    "name" => "Main Feature Category",
                "id" => $shortname."main_feature_category",
                "std" => "1",
                "type" => "text"),

    Here is what I currently have, but it is wrong:

    <?php query_posts('showposts=1&cat={echo std($middle_left_category);}'); ?>'); ?>
    <h6 class="category_head"><?php wp_list_categories('include={echo std($middle_left_category);}'); ?>&title_li=&style=none'); ?></h6>

    I’m sure it’s very basic for those familiar with PHP
    . Thanks in advance!

  • The topic ‘Echo values from theme options page onto home.php’ is closed to new replies.