Open OneTap-Online opened 4 years ago
Hi,
I wanted to use offset and posts number when turning on "Use As Archive Template" in the Listing Grid widget, so we can make more flexible blog layouts. Example: https://zzpservicedesk.onetap.website/category/belastingen/page/2
I changed the code locally to support this, can this be merged with the project?
Edits I did: File: jet-engine/includes/components/elementor-views/static-widgets/grid.php Line 113: remove condition from posts_num
Line 118, insert:
$this->add_control( 'posts_offset', array( 'label' => __( 'Posts offset', 'jet-engine' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'min' => 0, 'max' => 1000, 'step' => 1, 'condition' => array( 'is_archive_template' => 'yes', ), ) );
Line 2103:
if($settings['posts_num'] !== 0) { return array_slice($wp_query->posts, $settings['posts_offset'], $settings['posts_num']); } else { return $wp_query->posts; }
Entire file can be found for download here: https://filetransfer.kpn.com/download/df655f56-a8d6-4e9d-9ac9-dfdd661cebed#oeUrNsX_2mapBcMpOYtQ3Vr8PTdCjRAMDDeNJq4ch6A. (password is crocoblock)
Thanks in advance!
Any updates on this issue?
Hi,
I wanted to use offset and posts number when turning on "Use As Archive Template" in the Listing Grid widget, so we can make more flexible blog layouts. Example: https://zzpservicedesk.onetap.website/category/belastingen/page/2
I changed the code locally to support this, can this be merged with the project?
Edits I did: File: jet-engine/includes/components/elementor-views/static-widgets/grid.php Line 113: remove condition from posts_num
Line 118, insert:
Line 2103:
Entire file can be found for download here: https://filetransfer.kpn.com/download/df655f56-a8d6-4e9d-9ac9-dfdd661cebed#oeUrNsX_2mapBcMpOYtQ3Vr8PTdCjRAMDDeNJq4ch6A. (password is crocoblock)
Thanks in advance!