• Resolved Justine007

    (@justine007)


    I would like to add 3 boxes side by side in it I want to add a tittle, some discription and a link(Read more). Please help. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sounds like Featured Pages to me (on the Front Page).

    Check the documentation.

    Thread Starter Justine007

    (@justine007)

    Thanks for responding, it is not featured page, I would like to add a separate one. Just three rectangles or a rectangle with equal division to form three rectangles with some background color, a tittle, 20 words description, and a button link.

    Thread Starter Justine007

    (@justine007)

    <?php
    
    /********************************************************/
     //  Adds 4 widget areas after main content section inside the main wrapper on Home page
    /********************************************************/
    add_filter( 'tc_default_widgets' , 'add_featured_page_widget' );
    
    function add_featured_page_widget( $default_widgets_area ) {
    
    	$default_widgets_area ['fp_widgets'] = array(
    		'name' => __( 'Featured Pages Widget One' , 'customizr' ),
    		'description' => __( 'After main content area on home' , 'customizr' )
    	);
    
    	$default_widgets_area['fp_widgets_two'] = array(
    		'name' => __( 'Featured Pages Widget Two' , 'customizr' ),
    		'description' => __( 'After main content area on home' , 'customizr' )
    	);
    
    	$default_widgets_area['fp_widgets_three'] = array(
    		'name' => __( 'Featured Pages Widget Three' , 'customizr' ),
    		'description' => __( 'After main content area on home' , 'customizr' )
    	);
    
    	$default_widgets_area['fp_widgets_four'] = array(
    		'name' => __( 'Featured Pages Widget Four' , 'customizr' ),
    		'description' => __( 'After main content area on home' , 'customizr' )
    	);
    
    	return $default_widgets_area;
    }
    
    add_action('__after_main_container' , 'display_my_fp_widget', 20);
    
    function display_my_fp_widget() {
    	// if ( is_home() || is_front_page() ) {
    	if ( is_front_page() ) {
    	  ?>
    	  <!-- <div class="row-fluid"> -->   <!-- this allows a full width background rule via css for #main-wrapper -->
    	  <div class="row-fluid">
    	    <div class="span3"><?php dynamic_sidebar('fp_widgets'); ?></a></div>
    	    <div class="span3"><?php dynamic_sidebar('fp_widgets_two'); ?></div>
    	    <div class="span3"><?php dynamic_sidebar('fp_widgets_three'); ?></div>
    	    <div class="span3"><?php dynamic_sidebar('fp_widgets_four'); ?></div>
    	  </div>
    	  <?php
    	}
    }
    
    // Style all the featured pages widgets so they take up the right space
    add_filter( 'fp_widgets_class', 'display_my_fp_widget_class');
    add_filter( 'fp_widgets_two_widget_class', 'display_my_fp_widget_class');
    add_filter( 'fp_widgets_three_widget_class', 'display_my_fp_widget_class');
    add_filter( 'fp_widgets_four_widget_class', 'display_my_fp_widget_class');
    
    function add_featured_page_widget_class() {
    	return 'span3';
    }
    // https://presscustomizr.com/snippet/adding-widget-area-home/
    
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘customizing front page’ is closed to new replies.