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 | |
/* Credit Scotch.io : https://scotch.io/tutorials/a-guide-to-transients-in-wordpress */ | |
// Set variable for debugging | |
$usecache = true; | |
// Check if transient exists - use if it does | |
$projects = get_transient( 'tmbr_cached_projects' ); | |
if ( false === $projects || false === $usecache ) { |
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 to head of your theme.liquid after moving the files into the assets folder | https://www.woothemes.com/flexslider/ --> | |
<!-- add only if you theme is not already including Jquery--> | |
{{ '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' | script_tag }} | |
<!-- FLEX Slider css and .js --> | |
{{ 'flexslider.css' | asset_url | stylesheet_tag }} | |
{{ 'jquery.flexslider.js' | asset_url | script_tag }} | |
<!-- | |
add to schema json |
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 | |
// Get all products | |
$args = array( | |
'posts_per_page' => -1, | |
'post_type' => 'products', | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'no_found_rows' => 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
/* | |
** ACF Image Helper | |
** | |
** @Param $imageId: int - image ID you are using | |
** @Param $size: string - image size you want to retrieve | |
** @Param $fieldName: string (optional) - name of the image field within the repeater | |
** @Return Array - image url and alt text for image | |
** | |
*/ | |
function tmbr_get_cropped_image( $imageId, $size ) { |
NewerOlder