• Resolved controlb

    (@controlb)


    Please could you let me know how to change the homepage image.

    Ideally I would like to replace aside#fr-banner with a widget area, which template files would I need to change to do this?

Viewing 1 replies (of 1 total)
  • Thread Starter controlb

    (@controlb)

    I’ve answered my own question: I don’t need to know how to do the first part if I can do the second.

    In the child version of functions.php:

    function flat_responsive_widgets_child() {
    
    	register_sidebar( array(
    		'name' => __( 'Widget Name Here', 'flat-responsive' ),
    		'id' => 'widget-name-here',
    		'description' => __( 'This is the wide homepage banner space.', 'flat-responsive' ),
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget' => '</div>',
    		'before_title' => '',
    		'after_title' => '',
    	) );
    
    }
    add_action( 'widgets_init', 'flat_responsive_widgets_child' );

    and in the child version of header.php before <!--End of Style Store Banner-->:

    <?php
    	if ( ! is_active_sidebar( 'widget-name-here' ) ):
    		return;
    	elseif(is_active_sidebar( 'widget-name-here' ) ):
    		dynamic_sidebar( 'widget-name-here' );
    	endif;
     ?>

    Then shove anything required into Widget Name Here on the Widgets page.

Viewing 1 replies (of 1 total)
  • The topic ‘How to change homepage image?’ is closed to new replies.