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 | |
| $categories = get_categories( array( | |
| 'orderby' => 'name', | |
| 'parent' => 0 | |
| ) ); | |
| $category_list = array(); | |
| foreach ( $categories as $category ) { | |
| $category_list[] = '<a href="' . get_category_link( $category->term_id ) . '">' . esc_html( $category->name ) . '</a> '; | |
| } |
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 | |
| function wpdocs_custom_excerpt_length( $length ) { | |
| return 20; | |
| } | |
| add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 ); | |
| ?> |
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
| /* Mixin */ | |
| @mixin vertical-align($position: relative) { | |
| position: $position; | |
| top: 50%; | |
| -webkit-transform: translateY(-50%); | |
| -ms-transform: translateY(-50%); | |
| transform: translateY(-50%); | |
| } | |
| .element p { |
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 | |
| /** | |
| * Extend WordPress search to include custom fields | |
| * | |
| * http://adambalee.com | |
| */ | |
| /** | |
| * Join posts and postmeta tables | |
| * |
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
| // Multiple DIVs as a true background-image | |
| function addTriangleTo(target) { | |
| var dimensions = target.getClientRects()[0]; | |
| var pattern = Trianglify({ | |
| width: dimensions.width, | |
| height: dimensions.height | |
| }); | |
| target.style['background-image'] = 'url(' + pattern.png() + ')'; | |
| } |
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
| /********************* | |
| ANGLED MASKS | |
| *********************/ | |
| @mixin angled-mask($pseudo, $flip: false, $angle: 1.5deg) { | |
| // Possible values for $pseudo are: before, after, both | |
| @if $pseudo == 'before' or $pseudo == 'after' or $pseudo == 'both' { | |
| position: relative; | |
| z-index: 1; | |
| $selector: if($pseudo == 'both', '&:before,&:after', '&:#{$pseudo}'); |
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() { | |
| $('a[href*="#"]:not([href="#"])').click(function() { | |
| if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
| var target = $(this.hash); | |
| target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
| if (target.length) { | |
| $('html, body').animate({ | |
| scrollTop: target.offset().top | |
| }, 1000); | |
| return false; |
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
| AL : Alabama | |
| AK : Alaska | |
| AZ : Arizona | |
| AR : Arkansas | |
| CA : California | |
| CO : Colorado | |
| CT : Connecticut | |
| DE : Delaware | |
| FL : Florida | |
| GA : Georgia |