Magazine Pro- Making the Blog Page the Home Page

Community Forums Forums Design Tips and Tricks Magazine Pro- Making the Blog Page the Home Page

This topic is: resolved

This topic contains 6 replies, has 2 voices, and was last updated by  kiaajjjj 1 month, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #121495

    kiaajjjj
    Member
    Post count: 29

    Hi- Trying to make my blog page (www.lovelifeandlead.com/blog) the actual home page for http://www.lovelifeandlead.com.

    When I change “Front Page Displays –> A Static Page –> L3 Blog” in Reading, the original front page still displays. The only change is when I change “Front Page Displays Post – L3 Blog” I get the grid of posts.

    Do I need to delete the front-page.php in order for my blog page to display as my home page?

    Thanks,
    Adam

    http://www.lovelifeandlead.com/blog
    #121508

    braddalton
    Participant
    Post count: 10182

    Drag the front page file out of the theme folder.


    #121587

    kiaajjjj
    Member
    Post count: 29

    Works, except my header is now positioned over my inner wrap, and the header widget right has disappeared on the home page??
    http://www.lovelifeandlead.com

    #121639

    braddalton
    Participant
    Post count: 10182

    Shouldn’t effect your site at all, what it does is display posts in a loop on your home page.


    #121793

    kiaajjjj
    Member
    Post count: 29

    Brad- Still stuck.

    I removed the front page file and when I set the front page displays to Blog, this is what happens to the header: http://www.lovelifeandlead.com

    The About page is also set as a Blog Template and isn’t affected. Could it be something in the functions file?

    <?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Setup Theme
    include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );
    
    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'magazine', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'magazine' ) );
    
    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'Magazine Pro Theme', 'magazine' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/magazine/' );
    define( 'CHILD_THEME_VERSION', '3.1' );
    
    //* Enqueue Google Fonts and JS script
    add_action( 'wp_enqueue_scripts', 'magazine_enqueue_scripts' );
    function magazine_enqueue_scripts() {
    
    	wp_enqueue_script( 'magazine-entry-date', get_bloginfo( 'stylesheet_directory' ) . '/js/entry-date.js', array( 'jquery' ), '1.0.0' );
    	
    	wp_enqueue_script( 'magazine-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
    	
    	wp_enqueue_style( 'dashicons' );
    	
    	wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400|Raleway:400,500,900', array(), CHILD_THEME_VERSION );
    
    }
    
    //* Position post info above post title
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12);
    add_action( 'genesis_entry_header', 'genesis_post_info', 9 );
    
    //* Add Sidebar to Primary Nav Menu
    genesis_register_sidebar( array(
    	'id'          => 'nav-social-menu',
    	'name'        => __( 'Nav Social Menu', 'magazine-pro' ),
    	'description' => __( 'This is the nav social menu section.', 'magazine-pro' ),
    ) );
     
    add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 );
    add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 );
     
    function sws_social_icons($menu, $args) {
    	$args = (array)$args;
    	if ( 'primary' !== $args['theme_location'] )
    		return $menu;
    	ob_start();
    		echo '<li class="search-social">';
    		genesis_widget_area('nav-social-menu');
    		echo '</li>';
    	$social = ob_get_clean();
    	return $menu . $social;
    }
    
    //* Add HTML5 markup structure
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );
    
    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Add new image sizes
    add_image_size( 'home-middle', 360, 200, true );
    add_image_size( 'home-top', 750, 420, true );
    add_image_size( 'sidebar-thumbnail', 100, 100, true );
    
    //* Customize the return to top of page text
    add_filter( 'genesis_footer_backtotop_text', 'sp_footer_backtotop_text' );
    function sp_footer_backtotop_text($backtotop) {
    	$backtotop = '[footer_backtotop text="Return to Top"]';
    	return $backtotop;
    }
    
    //* Customize the entire footer
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    add_action( 'genesis_footer', 'sp_custom_footer' );
    function sp_custom_footer() {
    	?>
    	<p>&copy; Copyright 2014 <a href="http://lovelifeandlead.com/">Love. Life. Lead.</a> &middot; Rocked out with <a href="http://Studiopress.com/">Studiopress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
    	<?php
    }
    
    //* Add support for additional color styles
    add_theme_support( 'genesis-style-selector', array(
    	'magazine-pro-blue'   => __( 'Magazine Pro Blue', 'magazine' ),
    	'magazine-pro-green'  => __( 'Magazine Pro Green', 'magazine' ),
    	'magazine-pro-orange' => __( 'Magazine Pro Orange', 'magazine' ),
    ) );
    
    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    	'default-text-color'     => '000000',
    	'header-selector'        => '.site-title a',
    	'header-text'            => false,
    	'height'                 => 122,
    	'width'                  => 550,
    ) );
    
    //* Reposition the primary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_header', 'genesis_do_nav' );
    
    //* Add primary-nav class if primary navigation is used
    add_filter( 'body_class', 'backcountry_no_nav_class' );
    function backcountry_no_nav_class( $classes ) {
    
    	$menu_locations = get_theme_mod( 'nav_menu_locations' );
    
    	if ( ! empty( $menu_locations['primary'] ) ) {
    		$classes[] = 'primary-nav';
    	}
    	return $classes;
    }
    
    //* Customize search form input box text
    add_filter( 'genesis_search_text', 'magazine_search_text' );
    function magazine_search_text( $text ) {
    
    	return esc_attr( __( 'Search the site ...', 'magazine' ) );
    	
    }
    
    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'magazine_author_box_gravatar' );
    function magazine_author_box_gravatar( $size ) {
    
    	return 140;
    
    }
    
    //* Modify the size of the Gravatar in the entry comments
    add_filter( 'genesis_comment_list_args', 'magazine_comments_gravatar' );
    function magazine_comments_gravatar( $args ) {
    
    	$args['avatar_size'] = 100;
    	return $args;
    
    }
    
    //* Show custom menu in Footer
    add_action( 'genesis_footer', 'sk_custom_menu_in_footer' );
    function sk_custom_menu_in_footer() {
     
    	$class = 'menu genesis-nav-menu menu-footer';
     
    	$args = array(
    		'menu'           => 'Footer Menu', // Footer
    		'container'      => '',
    		'menu_class'     => $class,
    		'echo'           => 0,
    		'depth'           => 1,
    	);
     
    	$nav = wp_nav_menu( $args );
     
    	$nav_markup_open = genesis_markup( array(
    		'html5'   => '<nav %s>',
    		'xhtml'   => '<div id="nav">',
    		'context' => 'nav-footer',
    		'echo'    => false,
    	) );
    	$nav_markup_open .= genesis_structural_wrap( 'menu-footer', 'open', 0 );
     
    	$nav_markup_close  = genesis_structural_wrap( 'menu-footer', 'close', 0 );
    	$nav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
     
    	$nav_output = $nav_markup_open . $nav . $nav_markup_close;
     
    	echo $nav_output;
     
    }
    //* Remove entry meta in entry footer
    add_action( 'genesis_before_entry', 'magazine_remove_entry_meta' );
    function magazine_remove_entry_meta() {
    	
    	//* Remove if not single post
    	if ( ! is_single() ) {
    		remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
    		remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    		remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
    	}
    
    }
    
    //* Add Inner Wrap (Soliloquy)
    genesis_register_sidebar( array(
    	'id'          => 'featured',
    	'name'        => __( 'Featured', 'magazine' ),
    	'description' => __( 'This is the featured section.', 'magazine' ),
    ) );
     
    add_action( 'genesis_before_content_sidebar_wrap', 'sk_add_featured_section' );
    function sk_add_featured_section() {
     
    	if ( ! ( is_page_template('page_blog.php' ) || is_singular('post') ) )
    		return;
     
    	genesis_widget_area( 'featured', array(
    		'before'=> '<div class="featured widget-area">',
    		'after'	=> '</div>',
    	) );
     
    }
    
    //* Remove comment form allowed tags
    add_filter( 'comment_form_defaults', 'magazine_remove_comment_form_allowed_tags' );
    function magazine_remove_comment_form_allowed_tags( $defaults ) {
    	
    	$defaults['comment_notes_after'] = '';
    	return $defaults;
    
    }
    
    /** Add support for custom background */
    add_theme_support( 'custom-background' );
    
    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    //* Add support for after entry widget
    add_theme_support( 'genesis-after-entry-widget-area' );
    
    //* Relocate after entry widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_entry_footer', 'genesis_after_entry_widget_area' );
    
    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'home-top',
    	'name'        => __( 'Home - Top', 'magazine' ),
    	'description' => __( 'This is the top section of the homepage.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-middle',
    	'name'        => __( 'Home - Middle', 'magazine' ),
    	'description' => __( 'This is the middle section of the homepage.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom',
    	'name'        => __( 'Home - Bottom', 'magazine' ),
    	'description' => __( 'This is the bottom section of the homepage.', 'magazine' ),
    	
    ) );
    
    // Customize the post info function
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    	$post_info = '[post_date] by Swede and Family';
    	return $post_info;
    }
     
    // Remove the post info function
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    #121803

    kiaajjjj
    Member
    Post count: 29

    Got it. Had the Soliloquy CSS still in place.

    Thanks.

    #121792

    kiaajjjj
    Member
    Post count: 29

    Brad- Still stuck.

    I removed the front page file. Right now, I have it set on front page displays Blog, and you can see what it does to the header. http://www.lovelifeandlead.com

    The About page is also using the blog template, and it’s fine. http://www.lovelifeandlead.com/about

    Any idea what could be doing that? Here’s my functions file, sorry
    <?php
    //* Start the engine
    include_once( get_template_directory() . ‘/lib/init.php’ );

    //* Setup Theme
    include_once( get_stylesheet_directory() . ‘/lib/theme-defaults.php’ );

    //* Set Localization (do not remove)
    load_child_theme_textdomain( ‘magazine’, apply_filters( ‘child_theme_textdomain’, get_stylesheet_directory() . ‘/languages’, ‘magazine’ ) );

    //* Child theme (do not remove)
    define( ‘CHILD_THEME_NAME’, __( ‘Magazine Pro Theme’, ‘magazine’ ) );
    define( ‘CHILD_THEME_URL’, ‘http://my.studiopress.com/themes/magazine/’ );
    define( ‘CHILD_THEME_VERSION’, ’3.1′ );

    //* Enqueue Google Fonts and JS script
    add_action( ‘wp_enqueue_scripts’, ‘magazine_enqueue_scripts’ );
    function magazine_enqueue_scripts() {

    wp_enqueue_script( ‘magazine-entry-date’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/entry-date.js’, array( ‘jquery’ ), ’1.0.0′ );

    wp_enqueue_script( ‘magazine-responsive-menu’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/responsive-menu.js’, array( ‘jquery’ ), ’1.0.0′ );

    wp_enqueue_style( ‘dashicons’ );

    wp_enqueue_style( ‘google-fonts’, ‘//fonts.googleapis.com/css?family=Roboto:300,400|Raleway:400,500,900′, array(), CHILD_THEME_VERSION );

    }

    //* Position post info above post title
    remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12);
    add_action( ‘genesis_entry_header’, ‘genesis_post_info’, 9 );

    //* Add Sidebar to Primary Nav Menu
    genesis_register_sidebar( array(
    ‘id’ => ‘nav-social-menu’,
    ‘name’ => __( ‘Nav Social Menu’, ‘magazine-pro’ ),
    ‘description’ => __( ‘This is the nav social menu section.’, ‘magazine-pro’ ),
    ) );

    add_filter( ‘genesis_nav_items’, ‘sws_social_icons’, 10, 2 );
    add_filter( ‘wp_nav_menu_items’, ‘sws_social_icons’, 10, 2 );

    function sws_social_icons($menu, $args) {
    $args = (array)$args;
    if ( ‘primary’ !== $args['theme_location'] )
    return $menu;
    ob_start();
    echo ‘<li class=”search-social”>’;
    genesis_widget_area(‘nav-social-menu’);
    echo ‘‘;
    $social = ob_get_clean();
    return $menu . $social;
    }

    //* Add HTML5 markup structure
    add_theme_support( ‘html5′, array( ‘search-form’, ‘comment-form’, ‘comment-list’, ‘gallery’, ‘caption’ ) );

    //* Add viewport meta tag for mobile browsers
    add_theme_support( ‘genesis-responsive-viewport’ );

    //* Add new image sizes
    add_image_size( ‘home-middle’, 360, 200, true );
    add_image_size( ‘home-top’, 750, 420, true );
    add_image_size( ‘sidebar-thumbnail’, 100, 100, true );

    //* Customize the return to top of page text
    add_filter( ‘genesis_footer_backtotop_text’, ‘sp_footer_backtotop_text’ );
    function sp_footer_backtotop_text($backtotop) {
    $backtotop = ‘[footer_backtotop text="Return to Top"]‘;
    return $backtotop;
    }

    //* Customize the entire footer
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    add_action( ‘genesis_footer’, ‘sp_custom_footer’ );
    function sp_custom_footer() {
    ?>
    <p>© Copyright 2014 Love. Life. Lead. · Rocked out with Studiopress · Admin</p>
    <?php
    }

    //* Add support for additional color styles
    add_theme_support( ‘genesis-style-selector’, array(
    ‘magazine-pro-blue’ => __( ‘Magazine Pro Blue’, ‘magazine’ ),
    ‘magazine-pro-green’ => __( ‘Magazine Pro Green’, ‘magazine’ ),
    ‘magazine-pro-orange’ => __( ‘Magazine Pro Orange’, ‘magazine’ ),
    ) );

    //* Add support for custom header
    add_theme_support( ‘custom-header’, array(
    ‘default-text-color’ => ’000000′,
    ‘header-selector’ => ‘.site-title a’,
    ‘header-text’ => false,
    ‘height’ => 122,
    ‘width’ => 550,
    ) );

    //* Reposition the primary navigation menu
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    add_action( ‘genesis_before_header’, ‘genesis_do_nav’ );

    //* Add primary-nav class if primary navigation is used
    add_filter( ‘body_class’, ‘backcountry_no_nav_class’ );
    function backcountry_no_nav_class( $classes ) {

    $menu_locations = get_theme_mod( ‘nav_menu_locations’ );

    if ( ! empty( $menu_locations['primary'] ) ) {
    $classes[] = ‘primary-nav’;
    }
    return $classes;
    }

    //* Customize search form input box text
    add_filter( ‘genesis_search_text’, ‘magazine_search_text’ );
    function magazine_search_text( $text ) {

    return esc_attr( __( ‘Search the site …’, ‘magazine’ ) );

    }

    //* Modify the size of the Gravatar in the author box
    add_filter( ‘genesis_author_box_gravatar_size’, ‘magazine_author_box_gravatar’ );
    function magazine_author_box_gravatar( $size ) {

    return 140;

    }

    //* Modify the size of the Gravatar in the entry comments
    add_filter( ‘genesis_comment_list_args’, ‘magazine_comments_gravatar’ );
    function magazine_comments_gravatar( $args ) {

    $args['avatar_size'] = 100;
    return $args;

    }

    //* Show custom menu in Footer
    add_action( ‘genesis_footer’, ‘sk_custom_menu_in_footer’ );
    function sk_custom_menu_in_footer() {

    $class = ‘menu genesis-nav-menu menu-footer’;

    $args = array(
    ‘menu’ => ‘Footer Menu’, // Footer
    ‘container’ => ”,
    ‘menu_class’ => $class,
    ‘echo’ => 0,
    ‘depth’ => 1,
    );

    $nav = wp_nav_menu( $args );

    $nav_markup_open = genesis_markup( array(
    ‘html5′ => ‘<nav %s>’,
    ‘xhtml’ => ‘<div id=”nav”>’,
    ‘context’ => ‘nav-footer’,
    ‘echo’ => false,
    ) );
    $nav_markup_open .= genesis_structural_wrap( ‘menu-footer’, ‘open’, 0 );

    $nav_markup_close = genesis_structural_wrap( ‘menu-footer’, ‘close’, 0 );
    $nav_markup_close .= genesis_html5() ? ‘</nav>’ : ‘</div>’;

    $nav_output = $nav_markup_open . $nav . $nav_markup_close;

    echo $nav_output;

    }
    //* Remove entry meta in entry footer
    add_action( ‘genesis_before_entry’, ‘magazine_remove_entry_meta’ );
    function magazine_remove_entry_meta() {

    //* Remove if not single post
    if ( ! is_single() ) {
    remove_action( ‘genesis_entry_footer’, ‘genesis_entry_footer_markup_open’, 5 );
    remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );
    remove_action( ‘genesis_entry_footer’, ‘genesis_entry_footer_markup_close’, 15 );
    }

    }

    //* Add Inner Wrap (Soliloquy)
    genesis_register_sidebar( array(
    ‘id’ => ‘featured’,
    ‘name’ => __( ‘Featured’, ‘magazine’ ),
    ‘description’ => __( ‘This is the featured section.’, ‘magazine’ ),
    ) );

    add_action( ‘genesis_before_content_sidebar_wrap’, ‘sk_add_featured_section’ );
    function sk_add_featured_section() {

    if ( ! ( is_page_template(‘page_blog.php’ ) || is_singular(‘post’) ) )
    return;

    genesis_widget_area( ‘featured’, array(
    ‘before’=> ‘<div class=”featured widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    }

    //* Remove comment form allowed tags
    add_filter( ‘comment_form_defaults’, ‘magazine_remove_comment_form_allowed_tags’ );
    function magazine_remove_comment_form_allowed_tags( $defaults ) {

    $defaults['comment_notes_after'] = ”;
    return $defaults;

    }

    /** Add support for custom background */
    add_theme_support( ‘custom-background’ );

    //* Add support for 3-column footer widgets
    add_theme_support( ‘genesis-footer-widgets’, 3 );

    //* Add support for after entry widget
    add_theme_support( ‘genesis-after-entry-widget-area’ );

    //* Relocate after entry widget
    remove_action( ‘genesis_after_entry’, ‘genesis_after_entry_widget_area’ );
    add_action( ‘genesis_entry_footer’, ‘genesis_after_entry_widget_area’ );

    //* Register widget areas
    genesis_register_sidebar( array(
    ‘id’ => ‘home-top’,
    ‘name’ => __( ‘Home – Top’, ‘magazine’ ),
    ‘description’ => __( ‘This is the top section of the homepage.’, ‘magazine’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-middle’,
    ‘name’ => __( ‘Home – Middle’, ‘magazine’ ),
    ‘description’ => __( ‘This is the middle section of the homepage.’, ‘magazine’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-bottom’,
    ‘name’ => __( ‘Home – Bottom’, ‘magazine’ ),
    ‘description’ => __( ‘This is the bottom section of the homepage.’, ‘magazine’ ),

    ) );

    // Customize the post info function
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter($post_info) {
    $post_info = ‘[post_date] by Swede and Family’;
    return $post_info;
    }

    // Remove the post info function
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Magazine Pro- Making the Blog Page the Home Page’ is closed to new replies.