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
| <style> | |
| /* FAQs Schema Styling */ | |
| .accordion__item { | |
| margin: 0px auto 15px; | |
| } | |
| .accordion__item .accordion__title { | |
| position: relative; | |
| display: block; |
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 | |
| /* FAQs Shortcode */ | |
| add_shortcode( 'faqs', 'faqs_shortcode' ); | |
| function faqs_shortcode() { | |
| ob_start(); | |
| global $post; | |
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
| /* Blue */ | |
| .dot.blue { | |
| background:#629CD1; | |
| width: 25px; | |
| height: 25px; | |
| left: 95%; | |
| top: 220px; | |
| } | |
| .dot.blue:before { |
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
| .image img { | |
| -webkit-mask-image: url(https://kit-demos.envalab.com/dikan/wp-content/uploads/2021/08/02_creative-studio.png); | |
| -webkit-mask-size: contain; | |
| -webkit-mask-position: center center; | |
| -webkit-mask-repeat: no-repeat; | |
| } |
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 Pakistani Rupees Currency in Gravity Form */ | |
| add_filter( 'gform_currencies', 'add_pkr_currency' ); | |
| function add_pkr_currency( $currencies ) { | |
| $currencies['PKR'] = array( | |
| 'name' => __( 'Pakistan Rupee', 'gravityforms' ), | |
| 'symbol_left' => 'Rs', | |
| 'symbol_right' => '', | |
| 'symbol_padding' => ' ', |
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( 'template_redirect', 'redirect_user' ); | |
| function redirect_user() { | |
| if ( is_page('property-listing') && ! is_user_logged_in() ) { | |
| wp_redirect( 'https://www.sunconstruction.com.pk/dev/login/'); | |
| exit; | |
| } | |
| if ( is_page('login') && is_user_logged_in() ) { |
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 | |
| /* Map Gravity Form Checkbox to ACF Checkbox */ | |
| /* with Advanced Post Creation Gravity Form Addon */ | |
| /* Reference | https://support.advancedcustomfields.com/forums/topic/check-box-values-from-gravity-form-not-stored-in-acf-check-box/ */ | |
| // 5 is Form ID | |
| add_filter( 'gform_advancedpostcreation_post_after_creation_5', 'apc_serialize_checkboxes', 10, 4 ); | |
| function apc_serialize_checkboxes( $post_id, $feed, $entry, $form ) { | |
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 | |
| //Wordpress Update version gutenberg editor OFF | |
| add_filter('use_block_editor_for_post', '__return_false', 10); | |
| // Disables the block editor from managing widgets. | |
| add_filter( 'use_widgets_block_editor', '__return_false' ); |