Reply To: Remove blog from home page

Homepage Community Forums Ambition Remove blog from home page Reply To: Remove blog from home page

#18174
Wes
Moderator

    First take a look in the front-page.php file and remove this code in the aspire_front_page_genesis_meta section –

    $journal = get_option( 'aspire_journal_setting', 'true' );
    
    		if ( $journal === 'true' ) {
    
    			//* Add opening markup for blog section
    			add_action( 'genesis_before_loop', 'aspire_front_page_blog_open' );
    
    			//* Add closing markup for blog section
    			add_action( 'genesis_after_loop', 'aspire_front_page_blog_close' );
    
    		} else {
    		
    			//* Force full width content layout
    			add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
    
    			//* Remove the default Genesis loop
    			remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    			//* Remove .site-inner
    			add_filter( 'genesis_markup_site-inner', '__return_null' );
    			add_filter( 'genesis_markup_content-sidebar-wrap_output', '__return_false' );
    			add_filter( 'genesis_markup_content', '__return_null' );
    			remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    
    		}

    Then scroll near the bottom and remove this code –

    //* Add opening markup for blog section
    function aspire_front_page_blog_open() {
    
    	$journal_text = get_option( 'aspire_journal_text', __( 'Latest From the Blog', 'aspire' ) );
    	
    	if ( 'posts' == get_option( 'show_on_front' ) ) {
    
    		echo '<div id="journal" class="widget-area"><div class="wrap">';
    
    		if ( ! empty( $journal_text ) ) {
    
    			echo '<h2 class="widgettitle widget-title journal-title">' . $journal_text . '</h2><hr>';
    
    		}
    
    	}
    
    }
    
    //* Add closing markup for blog section
    function aspire_front_page_blog_close() {
    
    	if ( 'posts' == get_option( 'show_on_front' ) ) {
    
    		echo '</div></div>';
    
    	}
    
    }

    Then ADD this code inside the same section where you removed the first block of code in the aspire_front_page_genesis_meta section –

    //* Force full width content layout
    				add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
    	
    				//* Remove the default Genesis loop
    				remove_action( 'genesis_loop', 'genesis_do_loop' );
    				
    				//* Remove .site-inner
    				add_filter( 'genesis_markup_site-inner', '__return_null' );
    				add_filter( 'genesis_markup_content-sidebar-wrap_output', '__return_false' );
    				add_filter( 'genesis_markup_content', '__return_null' );
    				remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );