atts = array( 'style' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_archive_style' ), 'horizontal_alignment' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_horizontal_alignment' ), 'vertical_alignment' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_vertical_alignment' ), 'grid_columns' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_grid_columns' ), 'columns_gap' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_columns_gap' )['size'], 'bottom_gap' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_bottom_gap' )['size'], 'enable_parallax' => liquid_helper()->get_kit_frontend_option( 'liquid_portfolio_enable_parallax' ) ? '' : 'no', 'pagination' => 'pagination', 'css_animation' => 'none', 'disable_postformat' => 'yes', ); $this->render( $this->atts ); } /** * [render description] * @method render * @return [type] [description] */ public function render( $atts, $content = '' ) { $posts = get_posts( array( 'post_type' => 'liquid-archives', 'posts_per_page' => -1, ) ); if ( $posts ) { foreach ( $posts as $post ) { $condition = liquid_helper()->get_page_option( 'lqd_archives_rule', $post->ID ); if ( in_array( get_post_type(), $condition ) === true ){ echo \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $post->ID ); return; } } } extract( $atts ); // Locate the template and check if exists. $located = locate_template( array( "templates/portfolio/tmpl-$style.php" ) ); if ( ! $located ) { return; } $this->grid_id = $grid_id = uniqid( 'grid-'); //Container if ( defined( 'ELEMENTOR_VERSION' ) && is_callable( 'Elementor\Plugin::instance' ) ){ echo '
'; } else { echo '
'; } $before = $after = ''; if( 'masonry-creative' === $style ) { printf( '
', $this->grid_id, $grid_columns ); echo '
'; } else if ( $style === 'style05'){ echo ''; // Pagination if( 'pagination' === $atts['pagination'] ) { // Set up paginated links. $links = paginate_links( array( 'type' => 'array', 'prev_next' => true, 'prev_text' => '', 'next_text' => '' )); if( !empty( $links ) ) { printf( '', join( "\n\t
  • ", $links ) ); } } if( in_array( $atts['pagination'], array( 'ajax', 'ajax2', 'ajax3', 'ajax4' ) ) && $url = get_next_posts_page_link( $GLOBALS['wp_query']->max_num_pages ) ) { $hash = array( 'ajax' => 'btn btn-md ajax-load-more', ); $attributes = array( 'href' => add_query_arg( 'ajaxify', '1', $url), 'rel' => 'nofollow', 'data-ajaxify' => true, 'data-ajaxify-options' => json_encode( array( 'wrapper' => '.liquid-portfolio-list .liquid-portfolio-list-row', 'items' => '> .masonry-item' )) ); echo '
    '; } echo '
  • '; } } new Liquid_ThemePortfolio;