Last active
April 20, 2021 14:08
-
-
Save gicolek/39c05cd0b8cae788b852e12bbad63347 to your computer and use it in GitHub Desktop.
Custom Elementor Widget Settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| protected function _register_controls() { | |
| // Section Title | |
| $this->start_controls_section( | |
| 'section_title', | |
| [ | |
| 'label' => __( 'RAC Product Filters', 'elementor' ), | |
| ] | |
| ); | |
| // custom text setting 1 | |
| $this->add_control( | |
| 'items_per_page', | |
| [ | |
| 'label' => __( 'Items Per Page', 'elementor' ), | |
| 'label_block' => true, | |
| 'type' => Controls_Manager::TEXT, | |
| 'placeholder' => __( 'Specify Number of items', 'elementor' ), | |
| ] | |
| ); | |
| // custom text setting 2 | |
| $this->add_control( | |
| 'filters_heading', | |
| [ | |
| 'label' => __( 'Filters Heading', 'elementor' ), | |
| 'label_block' => true, | |
| 'type' => Controls_Manager::TEXT, | |
| 'placeholder' => __( 'Specify the heading above filters', 'elementor' ), | |
| ] | |
| ); | |
| // custom Wyswig Editor | |
| $this->add_control( | |
| 'filters_subtext', | |
| [ | |
| 'label' => __( 'Filters Sub text', 'elementor' ), | |
| 'label_block' => true, | |
| 'type' => Controls_Manager::WYSIWYG, | |
| 'placeholder' => __( 'Specify the content below filters', 'elementor' ), | |
| ] | |
| ); | |
| // this piece is required | |
| $this->end_controls_section(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment