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 | |
/** | |
* 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 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 | |
/* | |
* Resize images dynamically using wp built in functions | |
* @author Victor Teixeira | |
* @link http://core.trac.wordpress.org/ticket/15311 | |
* | |
* php 5.2+ | |
* | |
* Exemple use: |
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 | |
$args = array( | |
// Normal query goes here // | |
'no_found_rows' => true, // counts posts, remove if pagination required | |
'update_post_term_cache' => false, // grabs terms, remove if terms required (category, tag...) | |
'update_post_meta_cache' => false, // grabs post meta, remove if post meta required | |
); |
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 | |
/** | |
* Add Custom Avatar Field | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-custom-avatar/ | |
* | |
* @param object $user | |
*/ | |
function be_custom_avatar_field( $user ) { ?> | |
<h3>Custom Avatar</h3> |
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 Menu_With_Description extends Walker_Nav_Menu { | |
function start_el(&$output, $item, $depth, $args) { | |
global $wp_query; | |
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; | |
$class_names = $value = ''; | |
$classes = empty( $item->classes ) ? array() : (array) $item->classes; |
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 | |
/** | |
* Plugin Name: Display Posts Shortcode | |
* Plugin URI: http://www.billerickson.net/shortcode-to-display-posts/ | |
* Description: Display a listing of posts using the [display-posts] shortcode | |
* Version: 1.6 | |
* Author: Bill Erickson | |
* Author URI: http://www.billerickson.net | |
* | |
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU |
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 | |
/** | |
* Create Price Range Taxonomy | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-custom-taxonomies/ | |
* | |
*/ | |
function be_register_price_range_taxonomy() { |
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 | |
/** | |
* Template Name: Taxonomy Listing | |
* | |
* @package BE Genesis Child | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2011, Bill Erickson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* | |
*/ |
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 | |
/** | |
* Add Taxonomy to Page Names - CMS Page Order | |
* Taxonomy: 'rotator-location'. | |
* Example of result: Page Name (taxonomy term) | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/add-taxonomy-to-page-names-cms-page-order | |
* |
NewerOlder