Skip to content

Instantly share code, notes, and snippets.

View JoelEadeDesign's full-sized avatar

Joel Eade JoelEadeDesign

View GitHub Profile
@JoelEadeDesign
JoelEadeDesign / functions.php
Created April 23, 2024 01:58
Elementor Display Conditions for Page Templates
<?php
/**
* Elementor Conditions based on Page Template
*
* @return void
*/
add_action( 'elementor/theme/register_conditions', function( $conditions_manager ) {
class Page_Template_Condition extends ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base {
@JoelEadeDesign
JoelEadeDesign / functions.php
Last active August 14, 2024 06:25
Elementor Device Preview Width iPhone 14 (393x852px)
/**
* Elementor Device Preview Sizes
*
* @return void
*/
function add_custom_elementor_editor_css() {
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
echo '<style>
/* iPhone 14 – smallest viewport the responsive preview can be */