- 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 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 | |
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu { | |
function start_lvl( &$output, $depth ) { | |
//In a child UL, add the 'dropdown-menu' class | |
$indent = str_repeat( "\t", $depth ); | |
$output .= "\n$indent<ul class=\"dropdown-menu\">\n"; |
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 | |
/* | |
**** Load jQuery from Google CDN if available, local fallback if not **** | |
** Place in your theme's functions.php or relevant file. Edit local jQuery path if needed. | |
** Works as-is with WordPress Bones Theme v1.2 https://github.com/eddiemachado/bones (replace wp_enqueue_script( 'jquery' ); on line 142 | |
** reference: http://wp.tutsplus.com/tutorials/load-jquery-from-google-cdn-with-local-fallback-for-wordpress/ | |
*/ |
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 | |
/* | |
replacing the default "Enter title here" placeholder text in the title input box | |
with something more descriptive can be helpful for custom post types | |
place this code in your theme's functions.php or relevant file | |
source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963 | |
*/ |
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
/* | |
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 | |
*/ |
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
<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 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 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 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> |
OlderNewer