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
@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 );
@Allen : thank you Allen Unfortunately nothing happens neither via the child theme nor the original functions file. Any idea ? Thanks again.
@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.
Thank you Allen
Please login or Register to submit your answer