This file contains 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 | |
// Sort a CPT by Title – just change the CPT slug at is_post_type_archive | |
add_filter( 'parse_query', 'sorting_archives' ); | |
function sorting_archives( $wp_query ) { | |
if (is_post_type_archive( 'gg_engagement' ) || is_tax()) { | |
$wp_query->set( 'orderby', 'title' ); | |
$wp_query->set( 'order', 'ASC' ); | |
} | |
return $wp_query; |
This file contains 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
<input type="email" id="validateEmailAddress" class="form-control" autocomplete="off" onpaste="return false;" required="" placeholder="Re-enter your email address here..." data-com.agilebits.onepassword.user-edited="yes"> |
This file contains 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_tracking_to_footer() { | |
?> | |
<script type="text/javascript"> _linkedin_partner_id = "1061154"; window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; window._linkedin_data_partner_ids.push(_linkedin_partner_id); </script><script type="text/javascript"> (function(){var s = document.getElementsByTagName("script")[0]; var b = document.createElement("script"); b.type = "text/javascript";b.async = true; b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; s.parentNode.insertBefore(b, s);})(); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=1061154&fmt=gif" /> </noscript> | |
<?php | |
} | |
add_action ('wp_footer', 'add_tracking_info_to_footer', 99); |
This file contains 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
In Woocommerce -> Settings -> Shipping, set up a Shipping Zone for Standard Shipping. | |
Add Shipping methods, in this case three: Standard Shipping ($7), Discounted Shipping ($5), and Free Shipping ($0). | |
Add the PHP to functions.php. To find out the id # of the rates, inspect the shipping methods in your browser; | |
the data-id of the table row for each is what has to go into the 'flat_rate:x' string. |
This file contains 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 | |
/** | |
* | |
* This removes the ability to add the FULL image size into a post, it does not alter or delete the image | |
* Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size | |
* | |
* For now we have to do it this way to make the labels translatable, see trac ref below. | |
* | |
* If your theme has $content_width GLOBAL make sure and remove it |
This file contains 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 | |
// first, create the function to put your tracking code into | |
function add_tracking_info_to_head() { | |
// paste your tracking code between the ?> and <?php below – in this case it's for Google Analytics | |
?> | |
<!-- Global site tag (gtag.js) - Google Analytics --> |
This file contains 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_filter( 'fl_builder_override_lightbox', '__return_true' ); | |
?> |
This file contains 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( 'wp_enqueue_scripts', function() { | |
wp_enqueue_style( 'font-awesome-5' ); | |
} ); |
This file contains 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
<span class="fl-icon"><i class="far fa-address-card" aria-hidden="true"></i></span> | |
<span class="fl-icon"><i class="fab fa-linkedin-in" aria-hidden="true"></i></span> | |
<span class="fl-icon"><i class="far fa-envelope" aria-hidden="true"></i></span> | |
<span class="fl-icon"><i class="fas fa-phone" aria-hidden="true"></i></span> | |
<span class="fl-icon"><i class="fab fa-facebook-square" aria-hidden="true"></i></span> |
This file contains 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 | |
// via https://metabox.io/beaver-builder-remove-scripts-styles/ | |
// remove unneeded scripts/styles in BB | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_dequeue_style( 'font-awesome' ); // FontAwesome 4 | |
wp_enqueue_style( 'font-awesome-5' ); // FontAwesome 5 | |
wp_dequeue_style( 'jquery-magnificpopup' ); | |
wp_dequeue_script( 'jquery-magnificpopup' ); |