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 | |
/** | |
* Remove taxonomies that you probably won't need, and take forever to load all the terms in ACF taxonomy field. | |
* | |
* @version 1.0.0 | |
* @author @JiveDig | |
* @uses Advanced Custom Fields | |
* | |
* @param array $taxonomies The existing taxonomies. |
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 | |
/** | |
* Create a direct to cart/checkout/page add to cart button. | |
* | |
* Example: [buy_now id="1234" redirect="checkout"] | |
* | |
* @version 1.0.0 | |
* @author @JiveDig | |
* @link https://gist.github.com/JiveDig/6adde04666c189b6089fcfeca4988c47 |
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 | |
/** | |
* Autocomplete orders that contain only virtual products. | |
* If the order contains a non-virtual product the order will not be completed by this function. | |
* | |
* @author Mike Hemberger @JiveDig | |
* | |
* @version 1.0.0 | |
* |
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 | |
$dir = get_stylesheet_directory_uri(); | |
// Different scripts: Both are loaded. | |
wp_enqueue_script( 'test-one', $dir . '/assets/js/test-one.js', array(), '1.0.0', true ); | |
wp_enqueue_script( 'test-two', $dir . '/assets/js/test-two.js', array(), '1.0.0', true ); | |
// Identical scripts: 1 is loaded. | |
wp_enqueue_script( 'test-one', $dir . '/assets/js/test.js', array(), '1.0.0', 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
<?php | |
/** | |
* Gets the primary term of a post, by taxonomy. | |
* If Yoast Primary Term is used, return it, | |
* otherwise fallback to the first term. | |
* | |
* @version 1.3.0 | |
* | |
* @link https://gist.github.com/JiveDig/5d1518f370b1605ae9c753f564b20b7f |
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
{"home_url":"https:\/\/maitheme.com\/mai-lifestyle-pro","layout":"full-width-content","banner_id":false,"hide_banner":"0","hide_breadcrumbs":"0","hide_featured":"1","excerpt":"Mai Lifestyle Pro is among StudioPress' top-3 best selling themes for the last five months in a row, Mai Theme is currently powering some of the most high-traffic websites on the Internet.","images":{"618":"https:\/\/maitheme.com\/mai-lifestyle-pro\/wp-content\/uploads\/2017\/05\/brooke-cagle-199262.jpg","1573":"https:\/\/maitheme.com\/mai-lifestyle-pro\/wp-content\/uploads\/2018\/01\/brooke-cagle-157923.jpg"},"sections":[{"bg":"#f0f0f0","image_id":"","image":false,"overlay":"","inner":"","height":"xs","content_width":"sm","align_content":"","align":"center","text_size":"xl","id":"","class":"","context":"","title":"","content":"<em>\u201cThe Perfect Theme for Wellness, Food\/Recipe, Fitness, Lifestyle, or Small Business Websites and Blogs.\u201d<\/em>"},{"bg":"#ffffff","image_id":"","image":false,"overlay":"","inner":"","height":"lg","c |
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
{"home_url":"https:\/\/maitheme.com\/mlpexport","layout":"full-width-content","banner_id":false,"hide_banner":"0","hide_breadcrumbs":"0","hide_featured":"1","excerpt":"","images":{"618":"https:\/\/maitheme.com\/mlpexport\/wp-content\/uploads\/2017\/05\/brooke-cagle-199262.jpg","1573":"https:\/\/maitheme.com\/mlpexport\/wp-content\/uploads\/2018\/01\/brooke-cagle-157923.jpg"},"sections":[{"bg":"#f0f0f0","image_id":"","image":false,"overlay":"","inner":"","height":"xs","content_width":"sm","align_content":"","align":"center","text_size":"xl","id":"","class":"","context":"","title":"","content":"<em>\u201cThe Perfect Theme for Wellness, Food\/Recipe, Fitness, Lifestyle, or Small Business Websites and Blogs.\u201d<\/em>"},{"bg":"#ffffff","image_id":"","image":false,"overlay":"","inner":"","height":"lg","content_width":"","align_content":"","align":"center","text_size":"","id":"latest-posts","class":"","context":"","title":"Latest Posts","content":"Read our latest tips, tricks, and musings below.\r\n\r\n[grid cont |
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
/** | |
* The code in the following files will allow you to quickly customize the colors/branding of your Mai Theme powered website. | |
* Add the code to the theme's style.css file and adjust the colors as-needed. | |
*/ |
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 | |
// Replace the default "Read More" text in Mai Theme. | |
add_filter( 'mai_more_link_text', function( $text, $object_or_id, $type ) { | |
$text = 'Click Here'; | |
return $text; | |
}, 10, 3 ); |