Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Well I guess I could tell you what the problem is.

    You have to wrap the entire snippet in a function, presuming that your code is in the root of your functions.php file or other.

    Then call the function on the wordpress ‘init’ hook, add_action(‘init’,’theme_option’);

    As follow:

    <?php
    function options_function(){
    $themename = "My-Theme";
    $shortname = "nm";
    $nm_categories_obj = get_categories('hide_empty=0');
    $nm_categories = array();
    foreach ($nm_categories_obj as $nm_cat) {
    $nm_categories[$nm_cat->cat_ID] = $nm_cat->cat_name;
    }
    $categories_tmp = array_unshift($nm_categories, "Category Name:");
    $number_entries = array("Select a Number:","1","2","3","4","5","6");
    
    $options = array (
    
    array( "name" => "Select Category for Featured Posts",
    "id" => $shortname."_slide_category",
    "std" => "Select a category:",
    "type" => "select",
    "options" => $nm_categories),
    ...
    
    update_option('theme_options',$options);
    
    }
    
    add_action('init','option_function');

    Then reference the $options like so:

    $options = get_option('theme_options');
    foreach ($option as $option){
    ...

    Hope that helps.
    WooThemes.com

    Are you using a WooTheme? We are offering support to all the themes with the new upgrades to WordPress 2.8. This happens to be one of the problems. ??

    Thread Starter foxinni

    (@foxinni)

    But surely this is just permalinks… in a normal theme this works ALWAYS. And (/archive/123) is a pretty permalink and very much the same as the classic permalink structure.

    There must be some thing i’m missing. Also please note that on the single.php page… when you finally get there with the Permalink structure that allows you to, the comment count don’t show… that might give a clue as to whats the matter.

    Please.. any help?

Viewing 3 replies - 16 through 18 (of 18 total)