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 | |
$odd_or_even = 'even'; | |
$loop_2 = new WP_Query( 'cat=1&showposts=2&orderby=date&order=DESC' ); while ($loop_2->have_posts()) : $loop_2->the_post(); ?> | |
<div <?php post_class( $odd_or_even ); ?>> | |
<?php $odd_or_even = ( 'odd' == $odd_or_even ) ? 'even' : 'odd'; ?> | |
<div class="column-5 left"> | |
<a href="<?php the_permalink(); ?>" /><?php the_post_thumbnail( 'thumbnail', array( 'class' => 'featured-image' ) ); ?></a> | |
<a href="<?php the_permalink(); ?>" /><span class="read-more">Read More</span></a> |
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
// 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 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_filter( 'genesis_comment_form_args', 'child_comment_form' ); | |
/** | |
* Change "Post Comment" button text. | |
* | |
* @author Greg Rickaby | |
* @since 1.0.0 | |
*/ | |
function child_comment_form($args) { | |
$args = array ( | |
'label_submit' => __( 'Submit', 'genesis' ), |
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_action( 'genesis_after_post','ecowijs_add_widget_area_between_grid' ); | |
/** | |
* The ecowijs_add_widget_area_between_grid function is all about | |
* dAdding Widget Area between Genesis Featured and Genesis Gri | |
* | |
* @access public | |
* @return void | |
*/ |
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: Oembed as Post Meta | |
Author: Randy Hicks | |
Plugin URI: http://visualcoma.com | |
Author URI: http://visualcoma.com | |
Version: 0.2 | |
Updated: 09.29.12 | |
Description: Adds a custom metabox to specified post_types allowing for youtube and vimeo oembed | |
to be saved as hidden postmeta. Returns visalbe video url and video thumbnail. |
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( | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'order' => 'DESC', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'post_format', | |
'field' => 'slug', |
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 | |
$odd_or_even = 'even'; | |
$args = array( | |
'cat' => 1, | |
'posts_per_page' => 2, | |
'order' => 'DESC' | |
); | |
$query = new WP_Query( $args ); | |
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); |
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
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
add_action( 'genesis_before_post_content', 'child_post_info' ); | |
/** | |
* Custom Post-Info with Google Rich Snippet support | |
* | |
* @author Greg Rickaby | |
* @since 1.0.0 | |
*/ | |
function child_post_info() { | |
if ( is_page() ) |
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_action( 'init','fsm_thickbox' ); | |
/** | |
* fsm_thickbox function. | |
* | |
* @access public | |
* @param mixed $text | |
* @return void |
OlderNewer