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 Archive Layout | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/ | |
*/ | |
function be_create_archive_layout() { | |
genesis_register_layout( 'sidebar-content-archive', array( | |
'label' => __('Sidebar/Content Archive', 'genesis'), | |
'img' => get_bloginfo('stylesheet_directory') . '/images/layout-sidebar-content-archive.gif' |
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 | |
/** | |
* Custom Loop for Archive Layout | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/ | |
*/ | |
function be_archive_layout_loop() { | |
$site_layout = genesis_site_layout(); | |
if ( 'sidebar-content-archive' == $site_layout ) { | |
be_archive_loop(); |
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
/* WordPress Gallery | |
------------------------------------------ */ | |
.gallery { | |
margin-left: -0.5em; | |
margin-right: -0.5em; | |
} | |
.gallery:after { | |
display: table; |
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
function add_bulk_async_sdk() { ?> | |
<script> | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], | |
add = function(url, id) { | |
if (doc.getElementById(id)) {return;} | |
js = doc.createElement(script); | |
js.src = url; | |
id && (js.id = id); |
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' ); | |
} |
OlderNewer