最近免费中文字幕大全高清10,一个人在看www免费,在厨房拨开内裤进入在线视频,中文字幕亚洲乱码熟女在线 ,亚洲日本一区二区三区在线

如何在 Elementor 自定義模塊中渲染一個(gè)現(xiàn)有的模板-綜合討論論壇-討論專區(qū)-光子波動(dòng)網(wǎng) | 專業(yè)WordPress修復(fù)服務(wù),全球范圍,快速響應(yīng)

如何在 Elementor 自定義模塊中渲染一個(gè)現(xiàn)有的模板

我正在創(chuàng)建一個(gè)帶有中繼器的 Elementor 自定義模塊,我希望能夠?yàn)槊總€(gè)中繼器項(xiàng)選擇一個(gè)現(xiàn)有的模板并將其渲染。如何在 Elementor 控件中實(shí)現(xiàn)模板選擇,并在前端根據(jù)選擇渲染相應(yīng)的模板?

<?php

namespace elementorWidget;
use Elementor\Controls_Manager;
use Elementor\Widget_Base;

class CustomStore extends Widget_Base
{
    public function get_name()
    {
        return 'custom_store';
    }

    public function get_title()
    {
        return __('Custom Store', 'custom-store');
    }

    public function get_categories()
    {
        return ['general'];
    }

    /**
     * Register widget controls.
     */
    protected function _register_controls()
    {
        $this->start_controls_section(
            'section_content',
            [
                'label' => esc_html__('Content', 'textdomain'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'store_settings',
            [
                'label' => esc_html__('Store Settings', 'textdomain'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => [
                    [
                        'name' => 'title_section',
                        'label' => __('Title for Section', 'custom-store'),
                        'type' => \Elementor\Controls_Manager::TEXT,
                        'placeholder' => __('Enter Title', 'custom-store'),
                        'default' => __('Default Title', 'custom-store'),
                    ],
                ],
            ]
        );

        $this->end_controls_section();
    }

    protected function render()
    {
        $settings = $this->get_settings();
        $args = [];

        show_template('template', $args, str_replace(get_stylesheet_directory() . DIRECTORY_SEPARATOR, '', __DIR__));
    }
}

?

20241213165239265-image

?


聯(lián)系我們
教程看不懂?聯(lián)系我們?yōu)槟赓M(fèi)解答!免費(fèi)助力個(gè)人,小企站點(diǎn)!
客服微信
客服微信
電話:020-2206-9892
QQ咨詢:1025174874
郵件:info@361sale.com
工作時(shí)間:周一至周五,9:30-18:30,節(jié)假日休息
評(píng)論 共1條

請(qǐng)登錄后發(fā)表評(píng)論

客服

客服

在線時(shí)間
9:00 - 18:00

聯(lián)系客服

掃一掃聯(lián)系客服
電話聯(lián)系 020-2206-9892
QQ聯(lián)系 1025174874
客服郵箱 info@361sale.com