• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

update genesis setting options

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › update genesis setting options

This topic is: not resolved

Tagged: check, default, settings, tick, true, update

  • This topic has 2 replies, 3 voices, and was last updated 9 years, 5 months ago by Gary Jones.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 8, 2014 at 5:08 am #99020
    andym119
    Member

    Hello.

    I'm running a multisite and I am removing the genesis options in admin:

    remove_theme_support( 'genesis-admin-menu' );

    However, there are just 2 options I would like ticked by default; Enable Comments [ ] on posts? and [ ] on pages?

    Does anyone know how to do this?

    I am able to update any setting options for wordpress before removing them by doing for example:

    update_option( thread_comments, '1' );
    update_option( require_name_email, '0' );
    update_option( comment_order, 'desc' );

    But I am not sure how to do it with the Genesis settings.

    Any help much appreciated

    April 20, 2014 at 11:56 am #101484
    cdils
    Participant

    Hi Andy,
    I'm not positive, but I think genesis_update_settings is what you're after.

    http://docs.garyjones.co.uk/genesis/2.0.0/function-_genesis_update_settings.html.

    I'll ping Gary and see if he has additional insights.

    Cheers,
    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    April 21, 2014 at 4:54 am #101603
    Gary Jones
    Member

    Genesis theme settings and Genesis SEO settings are stored in two option fields as arrays.

    The supposedly private _genesis_update_settings() (note the leading _) can be used here. It's a shortcut for grabbing the Genesis settings (the theme settings by default), merging with your own defaults, then saving them again.

    Untested but something like:

    
    $custom_genesis_theme_settings = array(
    	'comments_posts' => 1,
    	'comments_pages' => 1,
    );
    
    _genesis_update_settings( $custom_genesis_theme_settings );

    should work. For updating something in the SEO settings page:

    $custom_genesis_seo_settings = array(
    	// ...
    );
    
    _genesis_update_settings( $custom_genesis_seo_settings, GENESIS_SEO_SETTINGS_FIELD );

    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble