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
| <script type="text/javascript"> | |
| (function($) { | |
| $(document).ready(function() { | |
| var navChildren = $("#primary-menu li").children(); | |
| var aArray = []; | |
| for (var i = 0; i < navChildren.length; i++) { | |
| var aChild = navChildren[i]; | |
| var ahref = $(aChild).attr('href'); | |
| aArray.push(ahref); | |
| } |
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
| Add to .gitignore file | |
| node_modules | |
| Then call: | |
| git rm -r --cached node_modules | |
| git commit -m "Remove node_modules now that they're ignored!" | |
| git push origin master |
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
| function parameterize($string, $sep = '-') { | |
| # Get rid of anything thats not a valid letter, number, dash and underscore and | |
| # replace with a dash | |
| $paramterized_string = preg_replace("/[^a-z0-9\-_]/i", $sep, $string); | |
| # Remove connected dahses so we don't end up with -- anyhwere. | |
| $paramterized_string = preg_replace("/$sep{2,}/", $sep, $paramterized_string); | |
| # Remove any trailing spaces from the string |
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 | |
| /* | |
| Term Archive Pages: | |
| - http://example.com/recipes/dinner/ | |
| - http://example.com/recipes/breakfast,brunch/ | |
| Single Recipe Pages: | |
| - http://example.com/recipes/dinner/soup-title/ |
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
| #content-wrapper | |
| +container | |
| #about | |
| // Default (smallest screens) | |
| +column(100%) | |
| background-color: #ccc | |
| // Respond to other screen widths |
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 | |
| add_filter( 'the_content', 'remove_empty_p', 20, 1 ); | |
| function remove_empty_p( $content ){ | |
| // clean up p tags around block elements | |
| $content = preg_replace( array( | |
| '#<p>\s*<(div|aside|section|article|header|footer)#', | |
| '#</(div|aside|section|article|header|footer)>\s*</p>#', | |
| '#</(div|aside|section|article|header|footer)>\s*<br ?/?>#', | |
| '#<(div|aside|section|article|header|footer)(.*?)>\s*</p>#', | |
| '#<p>\s*</(div|aside|section|article|header|footer)#', |