1

I have created one theme. The theme was denied today for the following reasons:

Theme Review:

  • Themes should be reviewed using define('WP_DEBUG', true); in wp-config.php
  • Themes should be reviewed using the test data from the Theme Checklists (TC)

wp-config.php is the WordPress setting file. How do I alter my custom theme?

  • the theme registers some custom functionality in the function warmHome_setup() however this function in not hooked so the functionality is not available. Recommend hooking the theme to the after_setup_theme hook.

The following is my themes warmHome_setup() function. How should I alter it?

function warmHome_setup() {

    // This theme styles the visual editor with editor-style.css to match the theme style.
    add_editor_style();

    // Add default posts and comments RSS feed links to head
    add_theme_support( 'automatic-feed-links' );

    // Make theme available for translation
    // Translations can be filed in the /languages/ directory
    load_theme_textdomain( 'warm-home', TEMPLATEPATH . '/languages' );

    $locale = get_locale();
    $locale_file = TEMPLATEPATH . "/languages/$locale.php";
    if ( is_readable( $locale_file ) )
        require_once( $locale_file );

    // This theme uses wp_nav_menu() in one location.
    register_nav_menus( array(
        'primary' => __( 'Primary Navigation', 'warm home' ),
    ) );

    // This theme allows users to set a custom background
    add_custom_background();
    }
  • 1
    Please note: these are questions you should be asking in the Trac ticket. The Theme Reviewers are there to help you answer such questions. – Chip Bennett May 31 '11 at 11:41
  • @Chip: I created a Trac question to discuss whether we should answer these questions on WPSE. Could you please give your opinion too? – Jan Fabry May 31 '11 at 12:19
  • @Jan Fabry: done! Thanks for pointing it out to me; I don't usually spend much time on Meta. – Chip Bennett May 31 '11 at 12:34
3

To answer your questions:

the wp-config.php is wordpress setting file. how to alter my custom theme?

you don't need to alter your theme, its simply telling you to turn debug to true within wp-config.php and review your theme, to see if it creating any warnings or errors. put this line define('WP_DEBUG', true); in your wp-config.php and play around with your site, see if you get any warnings or errors and correct them.

the following is my themes warmHome_setup() function. how to alter it? many thanks.

simply add add_action('after_setup_theme','warmHome_setup'); to your functions.php file

For example:

function warmHome_setup() {
    // all your setup functionality goes here
}
add_action( 'after_setup_theme', 'warmHome_setup');
  • Glad i can help. – Bainternet May 9 '11 at 9:59
  • when i should add add_action() to my custommed function. thank you. – enjoylife May 31 '11 at 7:21
  • anywhere in your functions.php file is fine. – Bainternet May 31 '11 at 7:41
  • i means if i have custommed lots of functions. which one or all the functions that i should add add_action()? – enjoylife May 31 '11 at 8:12
  • Functions are used in one of two ways in WordPress Themes: either the function is called directly in a template file, or else the function is hooked in via the Hooks API, either to filter some existing content, or else to add some content or functionality at a specific location/execution point. Which to use depends upon what you're doing with the function. – Chip Bennett May 31 '11 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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