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
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}"/> | |
<meta name="robots" content="noodp"/> | |
<link rel="canonical" href="{{ .Permalink }}" /> | |
<!-- Twitter Card --> | |
<meta name="twitter:card" content="summary" /> | |
<meta name="twitter:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" /> | |
<meta name="twitter:title" content="{{ .Title }}{{ if .IsHome }} - {{ .Site.Params.Tagline }}{{ else }} - {{ .Site.Title }}{{ end }}" /> | |
<meta name="twitter:site" content="{{ .Site.Params.twitter }}" /> | |
<meta name="twitter:creator" content="{{ .Site.Params.twitter }}" /> |
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 | |
/** | |
* Slides Custom Post Type | |
* | |
* Register a slides custom post type for those that insist. | |
* Useful when slides don't belong as posts or pages. Can be used with | |
* a plugin, e.g. Genesis Responsive Slider or a custom implementation. | |
* | |
* Does not currently include post content, only the excerpt. | |
*/ |
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
module.exports = function(grunt) { | |
require('jit-grunt')(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
cssmin: { | |
options: { | |
shorthandCompacting: false, | |
roundingPrecision: -1 |
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
## Using Genesis custom post class to set up anchor links | |
## See http://jeremyjaymes.com/anchor-links-genesis-custom-post-class | |
# Step 1 Open first custom query | |
# i.e. $my-query->the_post(); | |
<div class="person"> | |
<a href="#' . genesis_get_custom_field( '_genesis_custom_post_class' ) . '">Headshot</a> | |
</div> |
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 attachment file type extension | |
* | |
* Requires that you have the attachment id | |
* See this post http://jeremyjaymes.com/display-attach…ordpress-theme/ for more explanation | |
*/ | |
//* Assumes we're in a loop and have our attachment id already | |
$file_url = wp_get_attachment_url( $file_id ); |
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
//* Show the taxonomy ID | |
add_filter( "manage_edit-my_tax_columns", 'my_add_col' ); | |
add_filter( "manage_edit-my_tax_sortable_columns", 'my_add_col' ); | |
add_filter( "manage_my_tax_custom_column", 'my_tax_id', 10, 3 ); | |
function my_add_col( $new_columns ) { | |
$new_columns = array( | |
'cb' => '<input type="checkbox" />', | |
'name' => __('Name'), |
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 microdata to WordPress thumbnails | |
*/ | |
//* Using the_post_thumbnail | |
the_post_thumbnail( 'image-size', array( 'itemprop' => 'Photo' ) ); | |
//* Using get_the_post_thumbnail | |
get_the_post_thumnail( 'image-size', array( 'itemprop' => '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
<?php | |
/** | |
* Node-term.tpl function | |
* Add this to your theme's template.php, replace "mytheme" with your theme's name | |
*/ | |
function mytheme_preprocess_node(&$vars) { | |
foreach ($vars['node']->taxonomy as $term) { | |
$vars['template_files'][] = 'node-term-'. $term->tid; | |
} | |
} |
NewerOlder