Joshua David Nelson

Bullshit Free WordPress Development

  • Services
  • Code
  • About
  • Contact

Set Genesis Theme Settings Defaults

This shows everything, you can set a specific default (without changing the others) more simple with the example in the gist comments. See the defaults as listed in the (very useful) Genesis Docs Gary Jones maintains.

<?php
/**
* Set default Genesis Theme Options
*
* @author Joshua David Nelson, [email protected]
*/
add_filter( 'genesis_theme_settings_defaults', 'jdn_theme_settings' );
function jdn_theme_settings( $defaults ) {
$defaults = array(
'update' => 1,
'blog_title' => 'text',
'header_right' => 0,
'site_layout' => genesis_get_default_layout(),
'superfish' => 0,
'nav_extras' => '',
'nav_extras_twitter_id' => '',
'nav_extras_twitter_text' => __( 'Follow me on Twitter', 'genesis' ),
'feed_uri' => '',
'comments_feed_uri' => '',
'redirect_feeds' => 0,
'comments_pages' => 0,
'comments_posts' => 1,
'trackbacks_pages' => 0,
'trackbacks_posts' => 1,
'breadcrumb_home' => 0,
'breadcrumb_front_page' => 0,
'breadcrumb_posts_page' => 0,
'breadcrumb_single' => 0,
'breadcrumb_page' => 0,
'breadcrumb_archive' => 0,
'breadcrumb_404' => 0,
'breadcrumb_attachment' => 0,
'content_archive' => 'full',
'content_archive_thumbnail' => 0,
'posts_nav' => 'older-newer',
'blog_cat' => '',
'blog_cat_exclude' => '',
'blog_cat_num' => 10,
'header_scripts' => '',
'footer_scripts' => '',
'theme_version' => PARENT_THEME_VERSION,
'db_version' => PARENT_DB_VERSION,
);
return $defaults;
}
view raw default-genesis-theme-settings.php hosted with ❤ by GitHub

Source: https://gist.github.com/joshuadavidnelson/931c351631219f7cb696

Tags: filter, Genesis, settings

Previous Code:
Migrating WordPress Site Database SQL Queries
Back to the Code Snippets
Next Code:
Get Post Types By Taxonomy
  • Twitter
  • RSS Feed URL

About Me

I'm a WordPress Engineer. I build sleek, custom websites with WordPress and Genesis.

See my services and my recent work.

Contact me to get your project started.

Gravity Forms Plugin for WordPress Fastest WordPress Hosting

Recent Posts

  • Using Font Awesome Icons for WooCommerce Grid / List Toggle
  • Disable Blog: WordPress Gone Blog-less
  • Category (Taxonomy) Dropdown Filtered By Post Type
  • Weather in WordPress with Dark Sky
  • Fixing Your Deprecated Widget Constructors in WordPress 4.3
  • Twitter
  • RSS Feed URL
  • Code Snippets
  • My Plugins
  • Make a Payment

© Joshua David Nelson | Hand-Forged | WordPress + Genesis | Terms of Service | Legal | Contact