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
<html> | |
<!-- Example slide to be used within an orbit slider --> | |
<!-- Be sure to set the fluid ratio in your javascript when using divs in orbit, see the docs for details --> | |
<!--Example 1: Do not download image on mobile, show text slide instead --> | |
<div id="slide-1" class="orbit-slide"> | |
<div class="small-slide show-for-mobile" | |
<h2> A title </h2> | |
<p> This text will be displayed to mobile users </p> | |
</div> | |
<!-- this is the parent wrapper element with the visibility conditions applied to it --> |
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 | |
// don't include this opening PHP tag if you're copying this into your functions.php file etc | |
/** | |
* Renders a Product Subtitle | |
* | |
* Can change the html/classes etc as much as you want | |
* | |
* Requires Advanced Custom Fields to work |
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 | |
// don't include opening php tag unless necessary | |
function testimonial_widget($args, $instance) { | |
global $post; | |
$current_page_id = $post->ID; | |
$current_page_id_string = strval($post->ID); | |
// This queries for post_type of testimonal with a |
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
/* Targets the base menu item, so all menu items, | |
Then we override this with other styles later for more specific cases like the current page or when we hover | |
I've used the ID of the menu here to make sure nothing overrides it as ID = more specific than Classes | |
*/ | |
/* RULE 1 - ALL ITEMS IN THIS MENU */ | |
#menu-menu-1 .menu-item { |
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 | |
// put these functions in your themes function file or similar (plugin file maybe?) | |
function find_all_producers_in_this_region( $region_slug ) { | |
global $post; | |
/* | |
* This function is written to work on any page as long as it is supplied the region slug somehow | |
* | |
* If this is being displayed/used on a region's archive page, this 1st query is superflous |
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 | |
// Make sure you only use opening / closing tags if needed!!! | |
// Late priority so WC can't jump back in and re-enqueue them | |
add_action( 'wp_enqueue_scripts', 'woocommerce_de_script', 100 ); | |
// Removes WooCommerce Scripts on non shop/product/cart/checkout pages | |
function woocommerce_de_script() { | |
if (function_exists( 'is_woocommerce' )) { | |
if (!is_shop() && !is_cart() && !is_checkout() && !is_account_page() ) { // if we're not on a Woocommerce page, dequeue all of these scripts |
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 | |
// Make sure you only use opening / closing tags if needed!!! | |
// Late priority so WC can't jump back in and re-enqueue them | |
add_action( 'wp_enqueue_scripts', 'woocommerce_de_script', 100 ); | |
// Removes WooCommerce Scripts on non shop/product/cart/checkout pages | |
function woocommerce_de_script() { | |
if ( function_exists( 'is_woocommerce' ) ) { | |
if ( !is_shop() && !is_cart() && !is_checkout() && !is_account_page() && !is_page_template( 'custom-template.php' ) { |
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 | |
// Make sure you only use opening / closing tags if needed!!! | |
// Removes Contact Form 7 scripts and Styles except on contact-us page | |
add_action( 'wp', 'BSHP_cf7_conditionally_load_assets_simple' ); | |
// returns false, used for setting filters to false | |
function return_false() { | |
return false; | |
} |
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 | |
// Make sure you only use opening / closing tags if needed!!! | |
// Removes Contact Form 7 scripts and Styles except on contact-us page | |
add_action( 'wp', 'BSHP_cf7_conditionally_load_assets_custom' ); | |
// returns false, used for setting filters to false | |
function return_false() { | |
return false; | |
} |
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($) { | |
// Inside of this function, $() will work as an alias for jQuery() | |
// and other libraries also using $ will not be accessible under this shortcut | |
// Put your code here e.g. $('#page').find('.comments').each( myFunc()); etc | |
})(jQuery); |
OlderNewer