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 | |
| /* | |
| * Plugin Name: Root-based Category URLs | |
| * Description: Enables root-based Category URLs, i.e. Makes /category/my-category/ URLs route as /my-category/ | |
| * Author: Mike Schinkel | |
| * Author URI: http://about.me/mikeschinkel | |
| * Plugin URI: https://gist.github.com/1421235 | |
| * Version: 0.1.1 | |
| * License: GPL 2+ | |
| */ |
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 # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: Defer Contact Form 7 Scripts | |
| * Description: Adds <code>defer='defer'</code> to enqueued javascripts. | |
| * Version: 1.0 | |
| * Required: 3.3 | |
| * Author: Fuxia Scholz | |
| * Author URI: https://fuxia.me | |
| * License: GPL | |
| * License URI: http://www.gnu.org/copyleft/gpl.html |
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 | |
| // Get the repeater field | |
| $repeater = get_field( 'repeater_field_name' ); | |
| // Get a random rows. Change the second parameter in array_rand() to how many rows you want. | |
| $random_rows = array_rand( $repeater, 2 ); | |
| // Loop through the random rows if more than one is returned | |
| if( is_array( $random_rows ) ){ |
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
| /* ============================================================================= | |
| WordPress WYSIWYG Editor Styles | |
| ========================================================================== */ | |
| .entry-content img { | |
| margin: 0 0 1.5em 0; | |
| max-width: 100%; | |
| height: auto; | |
| } | |
| .alignleft, img.alignleft { |
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
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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 | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
| * Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
| */ | |
| $args = array( |
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 # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: T5 Parent Terms in body_class | |
| * Description: Adds all parent terms of a term archive to <code>body_class()</code>. | |
| * Version: 2012.0.14 | |
| * Author: Fuxia Scholz | |
| * License: MIT | |
| * License URI: http://www.opensource.org/licenses/mit-license.php | |
| */ |
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
| /** | |
| * Extend Recent Posts Widget | |
| * | |
| * Adds different formatting to the default WordPress Recent Posts Widget | |
| */ | |
| Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts { | |
| function widget($args, $instance) { | |
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 | |
| /* This snippet removes the action that inserts thumbnails to products in teh loop | |
| * and re-adds the function customized with our wrapper in it. | |
| * It applies to all archives with products. | |
| * | |
| * @original plugin: WooCommerce | |
| * @author of snippet: Brian Krogsard | |
| */ | |
| remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10); |