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
{ | |
"buttons": { | |
"preorder": { | |
"if": "product.tags contains preorder", | |
"href": "#!modal-preorder", | |
"text": "Request it" | |
}, | |
"product_buy": { | |
"if": "product.available == true", | |
"href_liquid": "'#!buy-' | append: product.variants[0].id", |
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 | |
$args = array( | |
'post_type' => 'post', | |
'post_status' => 'future' | |
); | |
$scheduled = new WP_Query( $args ); | |
if ( $scheduled->have_posts() ) : | |
?> | |
<?php while( $scheduled->have_posts() ) : $scheduled->the_post() ?> |
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 | |
function update_on_post_saved( $post_id ) { | |
if ( wp_is_post_revision( $post_id ) ) return; | |
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return; | |
// if ('NNN' !== $_POST['post_type']) return; return if post type is not NNN | |
// unhook this function so it doesn't loop infinitely | |
remove_action('save_post', 'update_on_post_saved'); |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
/** | |
* Default Category Title | |
* | |
* @author Bill Erickson | |
* @url http://www.billerickson.net/default-category-and-tag-titles | |
* | |
* @param string $headline |
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 | |
//hierarchical | |
//hook into the init action and call create_book_taxonomies when it fires | |
add_action( 'init', 'create_topics_hierarchical_taxonomy', 0 ); | |
//create a custom taxonomy name it topics for your posts | |
function create_topics_hierarchical_taxonomy() { |
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
var Library = wp.media.controller.Library; | |
var oldMediaFrame = wp.media.view.MediaFrame.Post; | |
// Extending the current media library frame to add a new tab | |
wp.media.view.MediaFrame.Post = oldMediaFrame.extend({ | |
initialize: function() { | |
// Calling the initalize method from the current frame before adding new functionality | |
oldMediaFrame.prototype.initialize.apply( this, arguments ); |
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
{% comment %} | |
Feature Multiple Collections & Products on Shopify Using Link List | |
Created by Minion Made //. minionmade.com | |
{% endcomment %} | |
{% capture uses_minimal_framework %}{% include 'product-loop' %}{% endcapture %} | |
{% if uses_minimal_framework contains 'Liquid error' %} | |
{% assign uses_minimal_framework = false %} | |
{% assign grid_item_width = 'col-xs-12' %} |
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 | |
$args = array( | |
'label' => '', // Text in Label | |
'class' => '', | |
'style' => '', | |
'wrapper_class' => '', | |
'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
'id' => '', // required | |
'name' => '', //name will set from id if empty |