Tito Dupret
asked 4 years ago

Hello,

I would like to limit the number of blocks displayed on Fixel’s homepage from 17 to 12. How could I do that ? You’ll understand the issue when looking at Haynault.be.

Thank you for your kind support,

tito./

3 Answers
Allen
answered 4 years ago

@Tito : hi, you can try add this code to the file functions.php:

function dw_fixel_limit_post( $limit, $query ) {

    if ( is_home() || is_front_page() && $query->is_main_query() ) {
        return 'LIMIT 0, 12';
    }

    return $limit;
}
add_filter( 'post_limits', 'dw_fixel_limit_post', 10, 2 );
Tito Dupret
answered 4 years ago

@Allen : thank you Allen Unfortunately nothing happens neither via the child theme nor the original functions file. Any idea ? Thanks again.

nobita
replied 4 years ago

@tito: hi, you can try this solution : Open the file : dw-fixel/inc/home.php
Then go to line : 8, change the number to 18
And Line 27 , change code to

$dw_homepage_layout['number'] = dw_get_theme_option('block_number',18);

Note* : the number in the item array is the location of the welcome block, facebook, twitter… you can change it if want.

Tito Dupret
answered 4 years ago

Thank you Allen

Powered by DW Question & Answer Pro