Fundamento

Fundamento

توسط

Have you ever wanted to alter the way Elementor renders one of its widgets on your website?

Fundamento provides an easier way to achieve this by allowing you to inject extra CSS classes into Elementor’s widgets.

Usage

Tell Elementor that you have a new skin available by utilizing the following code in your functions.php file:

  1. Add an action to initialize Fundamento, then add a call to Fundamento’s register_skin() function:

    if(is_plugin_active('fundamento/fundamento.php')) {
        function fundamento_init() {
            // create a new Fundamento instance
            $f = FundamentoPlugin::instance(); 
    
            // register a new skin
            $f->register_skin([
                'name'       => 'Red',                                                      // The name of your new skin, as it will appear in Elementor
                'element'    => 'button',                                                      // The elementor element you are skinning
                'is_default' => true,                                                          // optional - should this skin be set by default on all elements of this type
                'css'        => get_stylesheet_directory_uri() . '/skins/button/red.css',   // optional - have Fundamento enqueue an extra css file
                'js'         => get_stylesheet_directory_uri() . '/skins/button/red.js',    // optional - have Fundamento enqueue an extra js file
            ]);
        }
        add_action('elementor/init', 'fundamento_init');
    }
    
  2. Add the selector to your css file:

    /* Class will always be .skin-{element}-{name} */
    /* Name is transformed to lowercase and spaces are replaced with "-" */
    .skin-button-red {
        background: #f00;
    }
    

Tell Elementor that you have a new padding preset by utilizing the following code in your functions.php file:

  1. Add an action to initialize Fundamento, then add a call to Fundamento’s register_padding() function:

    if(is_plugin_active('fundamento/fundamento.php')) {
        function fundamento_init() {
            // create a new Fundamento instance
            $f = FundamentoPlugin::instance(); 
    
            // register a new skin
            $f->register_padding([
                'name'       => 'Standard',                                                    // The name of your padding preset, as it will appear in Elementor
                'element'    => 'section',                                                     // The elementor element you are skinning
                'padding'    => '30px',                                                        // The value and unit of the amount of padding this preset should apply
                'is_default' => true,                                                          // optional - should this skin be set by default on all elements of this type
            ]);
        }
        add_action('elementor/init', 'fundamento_init');
    }
    
  1. Upload the fundamento folder to your plugins directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add the Fundamento function call to your WordPress theme’s functions.php file
  4. Select a widget on your Elementor-enabled page and choose the custom skin you created
    or
  5. Select a widget on your Elementor-enabled page and choose the padding preset you created

سوالات متداول

پرسش و پاسخی برای این آیتم موجود نیست.
تصویری برای این آیتم موجود نیست.
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها
هیچ نسخه‌ای برای این آیتم موجود نیست.
★★★★★
★★★★★
5.0 /5 (2 نظر)

قیمت:

رایگان

نگارش

آخرین انتشار

17 اردیبهشت 1405

آخرین بروزرسانی

1 ماه پیش

نصب های فعال

70+

نگارش وردپرس

وردپرس 5.2+

تست شده از نسخه

وردپرس 6.7.5

نگارش PHP

PHP 7.4+

نسخه ها

0 نسخه