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 scroll_scripts() { | |
| if ( is_page_template( 'template-projects.php' ) ) { ?> | |
| <script> | |
| jQuery( document ).ready(function($) { | |
| jQuery(this).scrollTop(0); | |
| jQuery( "html" ).addClass( "noScroll" ); | |
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
| <?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() ) { |