• 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

Changing the # of blog posts showing on Education Pro

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 › Changing the # of blog posts showing on Education Pro

This topic is: resolved

Tagged: blog posts, education pro, theme-defaults

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 9 months ago by webcami.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 3, 2015 at 9:27 pm #135959
    webcami
    Participant

    Can someone help me figure out how to change the #of blog posts setting on the education pro theme?

    What I would like to do is limit the homepage blog post area to THREE, but have the BLOG and all archive posts set at 10.

    I have tried editing the theme defaults file: theme-defaults.php (lib/theme-defaults.php)

    I have tried changing it in theme settings.

    No luck.

    I am also designating what displays on the homepage blog area with this snippet:

    I would also love to have a h2 tag with a title above the homeblog - maybe it's in the same theme-defaults.php file?

    http://westseattlewordpress.com/xgymredux
    January 3, 2015 at 9:40 pm #135962
    Ren Ventura
    Member

    Can you post the code in your theme-defaults.php file and any other relevant code? It looks like you meant to post some but nothing is showing.

    Also, as a friendly heads-up, you're technically not supposed to use "wordpress" in a domain. This is a common mistake so I thought I'd point it out so you know in the future. http://wordpressfoundation.org/trademark-policy/


    Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren

    January 4, 2015 at 8:54 am #136010
    webcami
    Participant

    <?php

    //* Education Theme Setting Defaults
    add_filter( 'genesis_theme_settings_defaults', 'education_theme_defaults' );
    function education_theme_defaults( $defaults ) {

    $defaults['blog_cat_num'] = 3;
    $defaults['content_archive'] = 'excerpts';
    $defaults['content_archive_limit'] = 0;
    $defaults['content_archive_thumbnail'] = 0;
    $defaults['image_alignment'] = 'alignleft';
    $defaults['posts_nav'] = 'numeric';
    $defaults['site_layout'] = 'content-sidebar';

    return $defaults;

    }

    //* Education Theme Setup
    add_action( 'after_switch_theme', 'education_theme_setting_defaults' );
    function education_theme_setting_defaults() {

    if( function_exists( 'genesis_update_settings' ) ) {

    genesis_update_settings( array(
    'blog_cat_num' => 3,
    'content_archive' => 'excerpts',
    'content_archive_limit' => 0,
    'content_archive_thumbnail' => 0,
    'image_alignment' => 'alignleft',
    'posts_nav' => 'numeric',
    'site_layout' => 'content-sidebar',
    ) );

    genesis_update_settings( array(
    'location_horizontal' => 'right',
    'location_vertical' => 'top',
    'posts_num' => '3',
    'slideshow_arrows' => 0,
    'slideshow_excerpt_content_limit' => '170',
    'slideshow_excerpt_content' => 'full',
    'slideshow_excerpt_width' => '35',
    'slideshow_height' => '800',
    'slideshow_more_text' => __( 'Continue Reading', 'education' ),
    'slideshow_pager' => 0,
    'slideshow_title_show' => 1,
    'slideshow_width' => '1600',
    ), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD );

    } else {

    _genesis_update_settings( array(
    'blog_cat_num' => 3,
    'content_archive' => 'excerpts',
    'content_archive_limit' => 0,
    'content_archive_thumbnail' => 0,
    'image_alignment' => 'alignleft',
    'posts_nav' => 'numeric',
    'site_layout' => 'content-sidebar',
    ) );

    _genesis_update_settings( array(
    'location_horizontal' => 'right',
    'location_vertical' => 'top',
    'posts_num' => '3',
    'slideshow_arrows' => 0,
    'slideshow_excerpt_content_limit' => '170',
    'slideshow_excerpt_content' => 'full',
    'slideshow_excerpt_width' => '35',
    'slideshow_height' => '800',
    'slideshow_more_text' => __( 'Continue Reading', 'education' ),
    'slideshow_pager' => 0,
    'slideshow_title_show' => 1,
    'slideshow_width' => '1600',
    ), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD );

    }

    update_option( 'posts_per_page', 3 );

    }

    //* Set Genesis Responsive Slider defaults
    add_filter( 'genesis_responsive_slider_settings_defaults', 'education_responsive_slider_defaults' );
    function education_responsive_slider_defaults( $defaults ) {

    $args = array(
    'location_horizontal' => 'right',
    'location_vertical' => 'top',
    'posts_num' => '3',
    'slideshow_arrows' => 0,
    'slideshow_excerpt_content_limit' => '170',
    'slideshow_excerpt_content' => 'full',
    'slideshow_excerpt_width' => '35',
    'slideshow_height' => '800',
    'slideshow_more_text' => __( 'Continue Reading', 'education' ),
    'slideshow_pager' => 0,
    'slideshow_title_show' => 1,
    'slideshow_width' => '1600',
    );

    $args = wp_parse_args( $args, $defaults );

    return $args;
    }

    I changed everything "3" here to a "10" without results.

    Thanks for the info. It's only a mock up site location and blocked from search. It's just where I work on sites before moving them to client hosting.

    January 4, 2015 at 9:35 am #136021
    webcami
    Participant

    Solved part of this. Didn't realize the default under reading setting would auto set to 3. Changed it there. Marking as closed.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Changing the # of blog posts showing on Education Pro’ 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