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
/* Nav hover styles */ | |
header nav .primary li a:hover, | |
#latest header nav .primary li a.latest, | |
#design header nav .primary li a.design, | |
#development header nav .primary li a.development, | |
#mobile header nav .primary li a.mobile, | |
#tags header nav .primary li a.tags { background: #E9E7DC url(/img/light_background_tile.jpg); color: #545351; text-shadow: none; } |
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 the filter and function to your functions.php file | |
add_filter('body_class', 'add_slug_to_body_class'); | |
function add_slug_to_body_class($classes) { | |
global $post; | |
if(is_page()) { | |
$classes[] = sanitize_html_class($post->post_name); | |
} elseif(is_singular()) { |
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 | |
/** | |
* Template Name: Category Page | |
*/ | |
get_template_part('parts/shared/html-header'); | |
get_template_part('parts/shared/header'); | |
$args = array( | |
'type' => 'post', | |
'child_of' => 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
<h2>Products Cart Permalinks</h2> | |
{% for product in collections.all.products %} | |
<h3>{{ product.title }}</h3> | |
<ul> | |
{% for variant in product.variants %} | |
{% if variant.available == true %} | |
<li> | |
<a href="{{ shop.url }}/cart/{{variant.id}}:1">{{ variant.title }} / {{ variant.price | money }} ({{ variant.inventory_quantity }} left)</a> | |
<input type="text" value="{{ shop.url }}/cart/{{variant.id}}:1" size="100"> | |
</li> |
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_action( 'init', 'register_cpt_photo' ); | |
function register_cpt_photo() { | |
$labels = array( | |
'name' => _x( 'Photos', 'photo' ), | |
'singular_name' => _x( 'Photo', 'photo' ), | |
'add_new' => _x( 'Add New', 'photo' ), |
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
/** | |
* Shortcode that outputs a figure in the WordPress content editor generated content | |
* @author Keir Whitaker ([email protected] | keirwhitaker.com) | |
* | |
* @param type $atts The src attribute | |
* @param type $content The caption for the figcaption | |
* @return string | |
* | |
* Usage [figure src="/wp-content/test.jpg"]This is not linked up but this is <a href="http://yahoo.com">This is the content</a>[/figure] | |
* |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer