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 | |
| query_posts('YOUR QUERY HERE'); | |
| $i = 0; | |
| // Thanks to PaoloVIP for the suggestion to add round() for loops with an odd # of results | |
| if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
| if ($i == 0) echo '<div id="left">'; | |
| if ($i == (round($wp_query->post_count / 2))) echo '</div><div id="right">'; | |
| the_content(); // or whatever custom content you desire | |
| if ($i == round($wp_query->post_count)) echo '</div>'; | |
| $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
| <?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.5.1/wp-includes/query.php | |
| * http://www.inteligraphics.ro/2013/06/20/wordpress-wp_query-args-parameters-list/ | |
| */ |
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 revconcept_get_images($post_id) { | |
| global $post; | |
| $thumbnail_ID = get_post_thumbnail_id(); | |
| $images = get_children( array('post_parent' => $post_id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ); | |
| if ($images) : | |
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 a list of downloads | |
| * | |
| * Return an array of downloads suitable for CMB's select field. | |
| * | |
| * Example CMB select field usage: | |
| * | |
| * array( | |
| * 'name' => 'Download', |
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 ajax_get_latest_posts(){ | |
| $attachments = get_children(array('post_parent' => $post->ID, | |
| 'post_status' => 'inherit', | |
| 'post_type' => 'attachment', | |
| 'post_mime_type' => 'image', | |
| 'order' => 'ASC', | |
| 'orderby' => 'menu_order ID')); | |
| $allimagesizes = array(); | |
| foreach($attachments as $att_id => $attachment) { |
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 | |
| // Reduced to the minimum | |
| class ThumbnailFilter extends FilterIterator | |
| { | |
| private $wp_query; | |
| public function __construct( Iterator $iterator, WP_Query $wp_query ) | |
| { | |
| NULL === $this->wp_query AND $this->wp_query = $wp_query; | |
| parent::__construct( $iterator ); |
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 | |
| /** | |
| * Settings | |
| */ | |
| define('API_KEY', $_GET['apikey']); // CloudFlare API key | |
| define('USERNAME', 'user@example.com'); // Email address used to login into CloudFlare | |
| define('IP', getCurrentIP()); // Current IP address | |
| echo 'Setting IP address to "' . IP . '"...<br />'; |
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
| --- ddclient-3.8.1/ddclient 2011-07-11 15:04:21.000000000 -0600 | |
| +++ ddclient 2013-10-30 19:51:54.056629680 -0600 | |
| @@ -1,4 +1,3 @@ | |
| -#!/usr/bin/perl -w | |
| #!/usr/local/bin/perl -w | |
| ###################################################################### | |
| # $Id: ddclient 130 2011-07-11 21:02:07Z wimpunk $ | |
| @@ -13,12 +12,18 @@ | |
| # Support for multiple IP numbers added by | |
| # Astaro AG, Ingo Schwarze <ischwarze-OOs/4mkCeqbQT0dZR+AlfA@public.gmane.org> September 16, 2008 |
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
| ## Setup java | |
| if [ `uname -m` == 'x86_64' ]; then | |
| PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/" | |
| JAVA_HOME="/usr/lib64/jvm/java-7-oracle/" | |
| else | |
| PATH="/usr/lib/jvm/java-7-oracle/jre/bin/" | |
| JAVA_HOME="/usr/lib/jvm/java-7-oracle/" | |
| fi |
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: Static Templates | |
| * | |
| * If most of your site content is in .php template files, and you're tired of | |
| * creating new pages, assigning them page templates, creating page templates | |
| * then doing it all over again on production, this plugin is for you. | |
| * | |
| * Examples: | |
| * |