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 | |
| function set_elementor_global_colors_once() { | |
| if ( ! get_option('my_theme_elementor_colors_set') ) { | |
| $global_settings = \Elementor\Plugin::$instance->kits_manager->get_active_kit(); | |
| $global_settings->set_settings([ | |
| 'system_colors' => [ | |
| 'primary-color' => [ | |
| 'title' => __('Primary Color', 'your-textdomain'), | |
| 'color' => '#1e73be', |
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 | |
| function add_lazy_render_to_elementor_sections($element, $section_id, $args) | |
| { | |
| if (in_array($element->get_name(), ['section', 'container'])) { | |
| if (!$element->get_controls('hiroman_lazy_render')) { | |
| $element->start_controls_section('flying_press', [ | |
| 'tab' => \Elementor\Controls_Manager::TAB_ADVANCED, | |
| 'label' => esc_html__('Lazy Render HTML', 'hiroman'), | |
| ]); |
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 | |
| // place the snippet inside the functions.php file from your WordPress child theme | |
| use Elementor\Controls_Manager; | |
| add_action( 'elementor/dynamic_tags/register_tags', function( $dynamic_tags ) { | |
| class Custom_Image_Tag extends Elementor\Core\DynamicTags\Data_Tag { | |
| public function get_name() { | |
| return 'shortcode-image'; | |
| } |
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 | |
| add_action('elementor_pro/search/before_input', function ($module) { | |
| $module->remove_render_attribute('widget_props', 'name'); | |
| $module->remove_render_attribute('widget_props', 'value'); | |
| }); |
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
| jQuery( document ).ready(function($) { | |
| jQuery(window).scroll(function($){ | |
| if ($(this).scrollTop() > 80) { | |
| $('header.elementor-section').addClass('StickyHeader'); | |
| } else { | |
| $('header.elementor-section').removeClass('StickyHeader'); | |
| } | |
| }); | |
| }); |
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 | |
| // http://lifeonlars.com/wordpress/how-to-add-multiple-featured-images-in-wordpress/ | |
| // https://wp-qa.com/how-to-add-multiple-featured-image-upload-button-without-plugin-for-wordpress | |
| // add these code in functions.php after add_theme_support( 'post-thumbnails' ); | |
| add_theme_support( 'post-thumbnails' ); | |
| add_image_size( 'case-image', 1371, 893, true ); | |
| add_image_size( 'ipad-image', 2383, 1867, true ); | |
| add_image_size( 'feature-image', 960, 500, true ); |
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 | |
| //Add image field in taxonomy page | |
| add_action( 'our_portfolio_category_add_form_fields', 'add_custom_taxonomy_image', 10, 2 ); | |
| function add_custom_taxonomy_image ( $taxonomy ) { | |
| ?> | |
| <div class="form-field term-group"> | |
| <label for="image_id"><?php _e('Image', 'taxt-domain'); ?></label> | |
| <input type="hidden" id="image_id" name="image_id" class="custom_media_url" value=""> |
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
| jQuery( document ).ready(function($) { | |
| var sections = $('.animateiT'), | |
| nav = $('.jump-left'), | |
| nav_height = nav.outerHeight(); | |
| $(window).on('scroll', function() { | |
| var cur_pos = $(this).scrollTop(); | |
| sections.each(function() { | |
| var top = $(this).offset().top - 300; | |
| var bottom = top + $(this).outerHeight(); | |
| if (cur_pos >= top && cur_pos <= bottom) { |
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 | |
| // Website 1 | |
| /* API for Post Sync */ | |
| function send_post_to_campus($post_id) { | |
| if (wp_is_post_revision($post_id)) { | |
| error_log('Skipping post revision ID: ' . $post_id); | |
| return; |