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 | |
/** | |
* NOTE: We force the full-width content in the functions.php file already; no need to do that here as well. | |
*/ | |
/** | |
* Remove the standard loop | |
*/ | |
remove_action( 'genesis_loop', 'genesis_do_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
jQuery(document).ready(function($) { | |
/** | |
* If the value is preselected (runs when the the doc is ready) | |
*/ | |
// get the starting value of the field; empty means no selection is made and conditional fields should hide by default | |
var startingval = $('select#select-job-industry').val(); | |
if ( startingval == '' ) { |
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
/** | |
* Assign the sidebars | |
*/ | |
add_action( 'genesis_header','rb_change_genesis_sidebar' ); | |
function rb_change_genesis_sidebar() { | |
global $post; | |
if ( get_post_type() == 'post' ) { // Check if we're on a single post for the 'post' post type | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar'); // remove the default genesis sidebar |
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 | |
//* Don't include the opening php tag | |
/** | |
* Add an 'envira' shortcode to all default WordPress galleries | |
*/ | |
add_shortcode( 'gallery', 'prefix_envira_to_gallery_shortcode' ); | |
function prefix_envira_to_gallery_shortcode( $atts ) { | |
$atts[ 'envira'] = 'true'; | |
return gallery_shortcode( $atts ); |
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 | |
//* Do not include the opening php tag | |
//* Unregister the primary sidebar | |
unregister_sidebar( 'sidebar' ); | |
//* Unregister the secondary sidebar | |
unregister_sidebar( 'sidebar-alt' ); |
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 | |
//* Do not include the opening php tag | |
//* Force full-width-content | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
//* Force content-sidebar | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | |
//* Force sidebar-content |
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 | |
//* Do not include the opening php tag | |
//* Remove the link from titles | |
add_filter( 'genesis_post_title_output', 'prefix_custom_post_title' ); | |
function prefix_custom_post_title( $title ) { | |
$post_title = get_the_title( get_the_ID() ); | |
$title = '<h2 class="entry-title" itemprop="headline">' . $post_title . '</h2>'; | |
return $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 | |
//* Do not include the opening php tag | |
//* Remove the link from titles | |
add_filter( 'genesis_post_title_output', 'prefix_custom_post_title' ); | |
function prefix_custom_post_title( $title ) { | |
if ( is_post_type_archive( 'post' ) ) { | |
$post_title = get_the_title( get_the_ID() ); | |
$title = '<h2 class="entry-title" itemprop="headline">' . $post_title . '</h2>'; | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
//* Don't include the opening php tag | |
//* Display a widget area | |
genesis_widget_area( 'your-widget-area', array( | |
'before' => '<div>', // markup before the widget | |
'after' => '</div>', // markup after the widget | |
) ); |