• 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

Lifestyle Pro theme defaults php

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 › Lifestyle Pro theme defaults php

This topic is: resolved

Tagged: content archive, default settings, featured image, lifestyle, lifestyle Pro, theme default

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 6 months ago by KaterinaRoy.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 27, 2015 at 12:29 pm #142554
    april
    Participant

    Hi. I'm creating a design using the Lifestyle Pro theme. I would like to have the design set to automatically show the featured image as 634px in size (image size is already set in functions.php). Here is the code used for Lifestyle Pro theme in the theme-defaults.php

    //* Sweet Taylor Theme Setting Defaults
    add_filter( 'genesis_theme_settings_defaults', 'sweet_theme_defaults' );
    function sweet_theme_defaults( $defaults ) {

    $defaults['blog_cat_num'] = 5;
    $defaults['content_archive'] = 'full';
    $defaults['content_archive_limit'] = 575;
    $defaults['content_archive_thumbnail'] = 634;
    $defaults['image_alignment'] = 'alignleft';
    $defaults['posts_nav'] = 'numeric';
    $defaults['site_layout'] = 'content-sidebar';

    return $defaults;

    }

    //* Sweet Taylor Theme Setup
    add_action( 'after_switch_theme', 'sweet_theme_setting_defaults' );
    function sweet_theme_setting_defaults() {

    if( function_exists( 'genesis_update_settings' ) ) {

    genesis_update_settings( array(
    'blog_cat_num' => 5,
    'content_archive' => 'full',
    'content_archive_limit' => 575,
    'content_archive_thumbnail' => 634,
    'image_alignment' => 'alignleft',
    'posts_nav' => 'numeric',
    'site_layout' => 'content-sidebar',
    ) );

    } else {

    _genesis_update_settings( array(
    'blog_cat_num' => 5,
    'content_archive' => 'full',
    'content_archive_limit' => 575,
    'content_archive_thumbnail' => 634,
    'image_alignment' => 'alignleft',
    'posts_nav' => 'numeric',
    'site_layout' => 'content-sidebar',
    ) );

    }

    update_option( 'posts_per_page', 5 );

    }

    I though if I changed content_archive_thumbnail to the image size 634 that it would work but it didn't.
    Thanks for any help 🙂

    http://studiomommy.com/sweet-taylor/
    February 27, 2015 at 12:50 pm #142555
    april
    Participant

    Ah, never-mind. I figured it out. Just incase anyone wanted to know. I changed:

    all content_archive_thumbnail to 1

    then added

    image_size = 'home-large' (this is the name set in my functions.php for this image size)

    July 13, 2015 at 10:16 am #159282
    KaterinaRoy
    Member

    Hi April,

    What code did you have to change in your functions.php? I'm trying to do this on my Beautiful Pro website.

    Thanks in advance!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Lifestyle Pro theme defaults php’ is closed to new 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