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_entry_header', 'genesis_do_post_title' ); | |
add_action ('genesis_before_entry_content','add_before_title'); | |
add_action( 'genesis_before_entry_content', 'genesis_do_post_title' ); | |
function add_before_title(){ | |
echo 'do something'; | |
} |
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
/** Force full width layout */ | |
add_filter( 'genesis_pre_get_option_site_layout', 'child_do_layout' ); | |
function child_do_layout( $opt ) { | |
if ( is_single() ) { // Modify the conditions to apply the layout to here | |
$opt = 'full-width-content'; // You can change this to any Genesis layout | |
return $opt; | |
} | |
} |
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
//enqueues our external font awesome stylesheet | |
function enqueue_our_required_stylesheets(){ | |
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'); | |
} | |
add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets'); |
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
/* Also, add the plugin Simple Page Ordering to enable the ability to drag and drop posts to a specified order | |
add_action( 'genesis_before_loop', 'ntg_do_query' ); | |
/** Changes the Query before the Loop */ | |
function ntg_do_query() { | |
$posttype = get_post_type(); | |
if( $posttype == 'portfolio'){ | |
global $query_string; | |
query_posts( wp_parse_args( $query_string, array( 'orderby' => 'menu_order', 'order' => 'ASC' ) ) ); |
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
<style> | |
div{height:100px} | |
.left{float:left; width:100px;} | |
.right{float:right; width:300px;} | |
.middle-wrap{overflow:hidden} | |
.middle{margin:0 auto; width:50px} | |
</style> | |
<div class="left"></div> | |
<div class="right"></div> | |
<div class="middle-wrap"> |
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
//shout to Tiffany Brown - https://tiffanybbrown.com/2014/09/using-flexslider-with-wordpress/index.html | |
function build_gallery_content( $attrs ){ | |
static $instance = 0; | |
$instance++; | |
/* | |
Limiting what the user can do by | |
locking down most short code options. | |
*/ |
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 new_excerpt_more($more) { | |
return ''; | |
} | |
add_filter('excerpt_more', 'new_excerpt_more', 21 ); | |
function the_excerpt_more_link( $excerpt ){ | |
$post = get_post(); | |
$excerpt .= '<a href="'. get_permalink($post->ID) . '">continue reading</a>'; | |
return $excerpt; | |
} |
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 | |
//* Enqueue Dashicons | |
//* CHECK YOUR functions.php FILE FIRST! | |
add_action( 'wp_enqueue_scripts', 'b3m_enqueue_dashicons' ); | |
function b3m_enqueue_dashicons() { | |
wp_enqueue_style( 'dashicons' ); | |
} |
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
<div id="leftCol">Left</div> | |
<div id="rightCol">Right</div> | |
<div id="centerCol">Center</div> |
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
var _href = $("a.variables").attr("href"); | |
$("a.variables").attr("href", _href + '?id='+ $_GET["id"]); |