- Install node.js: http://nodejs.org/
- Install grunt.js: http://gruntjs.com/getting-started
- In the Terminal:
$ cd [directory]
- Either create
package.json
and use data in this gist'spackage.json
, or run$ npm init
and folow the steps - Make sure to add
"grunt": "latest"
indevDependencies
if you usenpm-init
to create thepackage.jason
file - Install Grunticon in the project:
$ npm install --save-dev grunt-grunticon
- Create
Gruntfile.js
and use data from theGruntfile.js
in this gist. Tweak grunticon file paths as needed.
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
// Gravity Forms style sheet | |
wp_register_style( 'gravity-forms', get_stylesheet_directory_uri() . '/library/css/gravity-forms.css', array(), '' ); | |
// only load on contact page | |
if(is_page('contact')){ | |
wp_enqueue_style('gravity-forms'); | |
} |
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
/* | |
---------------------------------------------------------------- | |
Gravity Forms Front End Form Styles | |
Version 1.7 | |
http: //www.gravityforms.com | |
updated: April 22, 2013 5:19 PM | |
*/ |
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 | |
$tax_name = 'tax_name'; | |
$terms = get_terms($tax_name); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
foreach ( $terms as $term ) { | |
echo '<section class="' . $term->name . '">'; | |
echo '<h2 class="section-title">' . $term->name . '</h2>'; | |
echo '<ul>'; |
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
<a id="mobile-menu-toggle" href="#">Menu</a> | |
<nav id="main-nav" class="closed"> | |
<ul> | |
<li><a href="#">One</a></li> | |
<li><a href="#">Two</a></li> | |
<li><a href="#">Three</a></li> | |
<li><a href="#">Four</a></li> | |
<li><a href="#">Five</a></li> | |
</ul> |
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
/** | |
* I wanted to know what get_queried_object() returns for different things in WordPress. | |
* | |
*/ | |
// I use this to grab the array returned | |
// depending on what is being queried, it will return a different array of values | |
<?php | |
$object = get_queried_object(); | |
var_dump($object); | |
?> |
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 | |
/* | |
As the title implies, this will give you a way to | |
1. output a complete list of terms for a given taxonomy (nothing special there) | |
2. highlight the terms that the current post has (the magic!) | |
Probably need to figure out a better way to echo out the url of the term archive page... | |
*/ |
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
<i class="star-1">1</i> | |
<i class="star-2">2</i> | |
<i class="star-3">3</i> | |
<i class="star-4">4</i> | |
<i class="star-5">5</i> | |
<i class="star-6">6</i> | |
<i class="star-7">7</i> | |
<i class="star-8">8</i> | |
<i class="star-9">9</i> | |
<i class="star-10">10</i> |
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
/* | |
Auto-version CSS & JS files, allowing for cache busting when these files are changed. | |
Place in functions.php or wherever you are enqueueing your scripts & styles | |
Avoids using query strings which prevent proxy caching | |
Adjust paths based on your theme setup. These paths work with Bones theme | |
*/ |