Skip to content

Instantly share code, notes, and snippets.

@bradpotter
bradpotter / functions.php
Last active Jun 1, 2021
Place a reusable Gutenberg block via a Genesis hook. (Where 956 is the Post ID of your reusable block)
View functions.php
add_action( 'genesis_before_footer', 'my_custom_query' );
function my_custom_query() {
$post_id = 956;
$queried_post = get_post($post_id);
echo $queried_post->post_content;
}
View genesis-simple-faq-styles.css
.gs-faq__question {
background: transparent;
border-bottom: 1px solid #eee;
color: #333;
padding-left: 0;
padding-right: 0;
}
.gs-faq__question:focus,
.gs-faq__question:hover {
View functions.php
remove_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 );
add_action( 'genesis_before_loop', 'sk_do_author_box_archive', 15 );
/**
* Add author box to the top of author archive.
*
* If the headline and description are set to display the author box appears underneath them.
*
* @since 1.4.0
*
* @uses genesis_author_box() Echo the author box and its contents.
@bradleysa
bradleysa / gist:7d1448253097784daf94
Last active Apr 8, 2022
WooCommerce: Add Continue Shopping Button on Cart Page
View gist:7d1448253097784daf94
<?php
/**
* Add Continue Shopping Button on Cart Page
* Add to theme functions.php file or Code Snippets plugin
*/
add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' );
function woo_add_continue_shopping_button_to_cart() {
@cjkoepke
cjkoepke / functions.php
Created Jul 12, 2014
Modify User Profile Widget's Gravatar Size in Genesis Child Theme
View functions.php
<?php
/**
*
* Modify the size of the Gravatar in the User Profile Widget
*
* @author Calvin Koepke
* @since 1.0.0
*/
add_filter( 'genesis_gravatar_sizes', 'ck_user_profile' );
function ck_user_profile( $sizes ) {
@AlphaBlossom
AlphaBlossom / remove-woocommerce-admin-theme-support-warning.php
Last active Feb 7, 2022
Integrate WooCommerce into Genesis Child Theme
View remove-woocommerce-admin-theme-support-warning.php
// Remove WooCommerce Theme Support admin message
add_theme_support( 'woocommerce' );
@studiopress
studiopress / pull-images.html
Created Feb 3, 2014
Parallax Pro Pull Images
View pull-images.html
<!-- This Image will pull out to the Left of the post content -->
<img class="pull-left" alt="Sample Image" src="http://demo.studiopress.com/parallax/files/2014/01/sample-1.jpg" />
<!-- This Image will pull out to the right of the post content -->
<img class="pull-right" alt="Sample Image" src="http://demo.studiopress.com/parallax/files/2014/01/sample-2.jpg" />
@nutsandbolts
nutsandbolts / Force content-sidebar layout on blog (Genesis)
Last active Jul 24, 2018
Force content-sidebar layout on blog posts when your default layout is full-width content
View Force content-sidebar layout on blog (Genesis)
//* Force sidebar on blog posts and archives
add_filter( 'genesis_pre_get_option_site_layout', 'nabm_force_layout' );
function nabm_force_layout( $opt ) {
if ( is_single() || is_archive() ) {
$opt = 'content-sidebar';
return $opt;
}
}