How to modify Elementor Canvas template
-
Greetings – I am using Elementor Canvas for a series of landing pages on my site. I need to add a custom
data-
attribute to the<body>
tag of these pages. I see the template at wp-content/plugins/elementor/modules/page-templates/templates/canvas.php. Is there a way to create a version of this file in my child theme and customize it? OR is there a hook that can be used to modify the<body>
tag to look something like this:<body data-my-attr="MY VALUE" class="page-template page-template-elementor_canvas page page-id-2151 logged-in wp-custom-logo landing-tpl-1 ast-desktop ast-plain-container ast-no-sidebar astra-2.3.0 ast-header-custom-item-inside ast-single-post ast-inherit-site-logo-transparent ast-above-mobile-menu-align-stack ast-flyout-menu-enable ast-default-above-menu-enable ast-flyout-right-side ast-default-below-menu-enable ast-full-width-layout ast-inherit-site-logo-sticky elementor-default elementor-template-canvas elementor-kit-14 elementor-page elementor-page-2151 astra-addon-2.3.2 " data-elementor-device-mode="desktop" style="" cz-shortcut-listen="true">
notice the 1st attribute….
- The topic ‘How to modify Elementor Canvas template’ is closed to new replies.