Optionen von Genesis Child Themes per Code setzen

Per Filter kann man diverse Optionen für Genesis Child Themes setzen. Als Beispiel setzt folgender Code „Für Seitentitel/Logo verwenden“ auf „Bild als Logo“.

add_filter( 'genesis_options', 'wpkb_genesis_options', 10, 2 );
function wpkb_genesis_options( $options, $setting ) {
    if ( $setting == GENESIS_SETTINGS_FIELD ) {
        $options['blog_title'] = 'image';
    }

    return $options;
}

Weitere mögliche Optionen sind:

$options['update']                    = 1;
$options['blog_title']                = 'text';
$options['header_right']              = 0;
$options['site_layout']               = 'content-sidebar';
$options['nav']                       = 1;
$options['nav_superfish']             = 1;
$options['nav_home']                  = 1;
$options['nav_type']                  = 'pages';
$options['nav_pages_sort']            = 'menu_order';
$options['nav_categories_sort']       = 'name';
$options['nav_depth']                 = 0;
$options['nav_extras_enable']         = 0;
$options['nav_extras']                = 'date';
$options['nav_extras_twitter_id']     = '';
$options['nav_extras_twitter_text']   = 'Follow me on Twitter';
$options['subnav']                    = 0;
$options['subnav_superfish']          = 1;
$options['subnav_home']               = 0;
$options['subnav_type']               = 'categories';
$options['subnav_pages_sort']         = 'menu_order';
$options['subnav_categories_sort']    = 'name';
$options['subnav_depth']              = 0;
$options['feed_uri']                  = '';
$options['comments_feed_uri']         = '';
$options['redirect_feeds']            = 0;
$options['comments_pages']            = 0;
$options['comments_posts']            = 1;
$options['trackbacks_pages']          = 0;
$options['trackbacks_posts']          = 1;
$options['author_box_single']         = 1;
$options['breadcrumb_home']           = 1;
$options['breadcrumb_single']         = 1;
$options['breadcrumb_page']           = 1;
$options['breadcrumb_archive']        = 1;
$options['breadcrumb_404']            = 1;
$options['content_archive']           = 'full';
$options['content_archive_thumbnail'] = 0;
$options['posts_nav']                 = 'older-newer';
$options['blog_cat']                  = '';
$options['blog_cat_exclude']          = '';
$options['blog_cat_num']              = 10;
$options['header_scripts']            = '';
$options['footer_scripts']            = '';
$options['theme_version']             = PARENT_THEME_VERSION;

Schreibe einen Kommentar