start_controls_section( 'section_detail', array( 'label' => esc_html__( 'Section Setting', 'accesspress-parallax' ), ) ); $this->add_control( 'section_layout', array( 'label' => esc_html__( 'Section Layout:', 'accesspress-parallax' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'default' => 'layout1', 'options' => array( 'layout1' => esc_html__('Layout 1','accesspress-parallax'), 'layout2' => esc_html__('Layout 2','accesspress-parallax'), ) ) ); $this->end_controls_section(); $this->query_controls(); $this->post_excerpts( array( 'title_excerpts' => true, 'content_excerpts' => true, 'readmore' => true )); //styling tab $this->start_controls_section( 'section_general_style', [ 'label' => esc_html__( 'General Styles', 'accesspress-parallax' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); //element title $this->add_control( 'content_title_color', [ 'label' => esc_html__( 'Content Title Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} h4.portfolio-post-title a' => 'color: {{VALUE}};', ], ] ); //element title $this->add_control( 'content_title_color_hover', [ 'label' => esc_html__( 'Content Title Color: Hover', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} h4.portfolio-post-title a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'content_category_color', [ 'label' => esc_html__( 'Category Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .portfolio-category' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'content_description_color', [ 'label' => esc_html__( 'Content Description Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .portfolio-excerpt' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_title_typography', 'label' => esc_html__( 'Content Title Typography', 'accesspress-parallax' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} h4.portfolio-post-title', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_category_typography', 'label' => esc_html__( 'Content Category Typography', 'accesspress-parallax' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .portfolio-category', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_excerpt_typography', 'label' => esc_html__( 'Content Description Typography', 'accesspress-parallax' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .portfolio-excerpt', ] ); //element title $this->add_control( 'content_button_color', [ 'label' => esc_html__( 'Button Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .portfolio-readmore' => 'color: {{VALUE}};', ], ] ); //element title $this->add_control( 'content_button_color_hover', [ 'label' => esc_html__( 'Button Color: Hover', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .portfolio-readmore:hover' => 'background-color: {{VALUE}};border-color: {{VALUE}};', ], ] ); $this->end_controls_section();//end for styling tab } /** * Render Accesspress_Parallax_Elementor_Section widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @access protected */ protected function render() { $settings = $this->get_settings(); $layout = isset( $settings[ 'section_layout' ] )? $settings[ 'section_layout' ] : 'layout1'; $this->add_render_attribute( 'ap-portfolio', 'class', 'ap-portfolio-section ' ); $showposts = isset( $settings[ 'showposts' ] )? $settings[ 'showposts' ] : ''; $excerpt = isset( $settings[ 'content_excerpts' ] )? $settings[ 'content_excerpts' ] : 200; $block_args = accesspress_parallax_query($settings,$first_id='', $showposts ); $query = new \WP_Query( $block_args ); ?>