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: Test */ | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed |
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 | |
/** | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.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
<?php | |
add_action( 'genesis_before', 'child_conditional_actions' ); | |
function child_conditional_actions() { | |
if( /**insert your conditional statements here */ ) { | |
//put your actions here | |
} | |
//you could add additional conditional statements as needed here |
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
DELETE pm | |
FROM wp_postmeta pm | |
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id | |
WHERE wp.ID IS NULL |
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_action( 'get_header', 'bourncreative_remove_page_titles' ); | |
function bourncreative_remove_page_titles() { | |
if ( is_page() && ! is_page_template( 'page_blog.php' ) ) | |
remove_action( 'genesis_post_title', 'genesis_do_post_title' ); | |
} |
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 Column Classes to Display Posts Shortcodes | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/add-column-classes-to-display-posts-shortcode | |
* | |
* @param array $classes | |
* @param object $post | |
* @param object $query | |
* @return array $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
/** | |
* Filter Genesis H1 Post Titles to add <span> for styling | |
* | |
*/ | |
add_filter( 'genesis_post_title_output', 'filter_genesis_post_title_tags', 15 ); | |
function filter_genesis_post_title_tags( $title ) { | |
if ( is_singular() ) | |
$title = sprintf( '<h1 class="entry-title"><span>%s</span></h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) ); |
OlderNewer