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
    
  
  
    
  | add_filter('posts_clauses', 'loc_order_by_stock_status'); | |
| function loc_order_by_stock_status($posts_clauses) { | |
| global $wpdb; | |
| if (is_woocommerce() && (is_shop() || is_product_category() || is_product_tag())) { | |
| $posts_clauses['join'] .= " INNER JOIN $wpdb->postmeta istockstatus ON ($wpdb->posts.ID = istockstatus.post_id) "; | |
| $posts_clauses['orderby'] = " istockstatus.meta_value ASC, " . $posts_clauses['orderby']; | |
| $posts_clauses['where'] = " AND istockstatus.meta_key = '_stock_status' AND istockstatus.meta_value <> '' " . $posts_clauses['where']; | |
| } | |
| return $posts_clauses; | |
| } | 
  
    
      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
    
  
  
    
  | function loc_translate_login_username() { | |
| function loc_login_label_username( $translated_text, $text, $domain ) { | |
| if ( 'Username or Email Address' === $text || 'Username' === $text ) { | |
| $translated_text = __( 'User ID' , 'flatsome-child' ); | |
| } | |
| return $translated_text; | |
| } | |
| add_filter( 'gettext', 'loc_login_label_username', 20, 3 ); | |
| } | |
| add_action( 'login_head', 'loc_translate_login_username' ); | 
  
    
      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
    
  
  
    
  | function loc_article_update_date( $content ) { | |
| $u_time = get_the_time('U'); | |
| $u_modified_time = get_the_modified_time('U'); | |
| if ($u_modified_time >= $u_time + 86400) { | |
| $updated_date = get_the_modified_time('F jS, Y'); | |
| $updated_time = get_the_modified_time('h:i'); | |
| $custom_content .= '<p class="last-updated">Updated on '. $updated_date . ' at '. $updated_time .'</p>'; | |
| // feel free to change the text printed on line 7 into whatever you like | |
| } | |
  
    
      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
    
  
  
    
  | add_action( 'woocommerce_single_product_summary', 'request_qoute', 30 ); | |
| function request_qoute() { | |
| echo '<button type="submit" id="trigger_cf" class="single_add_to_cart_button button alt">Request a Quote</button>'; | |
| echo '<div id="product_inq" style="display:none">'; | |
| echo do_shortcode('[paste_your_contact_form_7_shortcode_here]'); | |
| echo '</div>'; | |
| } | |
| add_action( 'woocommerce_single_product_summary', 'show_and_hide_quote', 40); | |
| function show_and_hide_quote() { | 
  
    
      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
    
  
  
    
  | // The form will automatically fetch information from the product (only single products) | |
| // and put that information into a CF7 form. | |
| // 1) Make sure you have Contact Form 7 installed | |
| // 2) Install "Contact Form 7 - Dynamic Text Extension" | |
| // Link: https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/ | |
| // Form section for your CF7 -> | |
| <div class="locfix"> | |
| <div id="left"> | 
  
    
      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
    
  
  
    
  | function loc_product_inquiry_cf7() { | |
| echo '<button type="submit" id="trigger_inquiry" class="single_add_to_cart_button button alt">Product Inquiry</button>'; | |
| echo '<div id="product_inquiry" style="display:none">'; | |
| echo do_shortcode('[INSERT YOUR CONTACT FORM 7 SHORTCODE HERE]'); | |
| echo '</div>'; | |
| } | |
| add_action( 'woocommerce_single_product_summary', 'loc_product_inquiry_cf7', 30 ); | |
| function loc_product_inquiry_cf7_populate() { | |
| ?> | 
  
    
      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
    
  
  
    
  | <IfModule mod_headers.c> | |
| <FilesMatch ".(js|css|xml|gz|html)$"> | |
| Header append Vary: Accept-Encoding | |
| </FilesMatch> | |
| </IfModule> | |
| // To fix this on a NGINX server configuration, use this: gzip_vary on | |
| // The NGINX configuration files are located in /etc/nginx/ and the primary configuration file is /etc/nginx/nginx.conf. | 
  
    
      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
    
  
  
    
  | Slideshow -> | |
| <div class="slideshow bb-display-container bb-center"> | |
| <img src="/images/la.jpg" style="width:100%"> | |
| <div class="bb-display-bottommiddle bb-container bb-text-white bb-padding-32 bb-hide-small"> | |
| <h3>Los Angeles</h3> | |
| <p><b>We had the best time playing at Venice Beach!</b></p> | |
| </div> | |
| </div> | |
| <div class="slideshow bb-display-container bb-center"> | 
  
    
      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
    
  
  
    
  | // step 1 is to add the code below to your .htaccess file. Make sure to change the IP number to your own. | |
| // This means that everyone except you (your IP) will be re-directed to the "Coming soon" page. | |
| // If you remove line 10 the background will not work. | |
| # MAINTENANCE-PAGE REDIRECT | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000 | |
| RewriteCond %{REQUEST_URI} !/comingsoon.html$ [NC] | |
| RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] | 
  
    
      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
    
  
  
    
  | RewriteEngine On | |
| RewriteCond %{HTTPS} off | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |