Skip to content

Instantly share code, notes, and snippets.

View cre8tivediva's full-sized avatar

Anita cre8tivediva

  • 10:58 (UTC -05:00)
View GitHub Profile
@nutsandbolts
nutsandbolts / Force content-sidebar layout on blog (Genesis)
Last active July 24, 2018 16:04
Force content-sidebar layout on blog posts when your default layout is full-width content
//* 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;
}
}
@studiopress
studiopress / pull-images.html
Created February 3, 2014 06:55
Parallax Pro Pull Images
<!-- 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" />
@AlphaBlossom
AlphaBlossom / remove-woocommerce-admin-theme-support-warning.php
Last active February 7, 2022 15:35
Integrate WooCommerce into Genesis Child Theme
// Remove WooCommerce Theme Support admin message
add_theme_support( 'woocommerce' );
@cjkoepke
cjkoepke / functions.php
Created July 12, 2014 20:11
Modify User Profile Widget's Gravatar Size in Genesis Child Theme
<?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 ) {
@bradleysa
bradleysa / gist:7d1448253097784daf94
Last active February 17, 2024 12:50
WooCommerce: Add Continue Shopping Button on Cart Page
<?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() {
@srikat
srikat / functions.php
Last active June 5, 2016 01:43
Display author box on author archives incl. paged pages. https://sridharkatakam.com/display-author-box-pages-author-archives-genesis/
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.
@jdelia
jdelia / genesis-simple-faq-styles.css
Created August 26, 2017 10:38
Genesis Simple FAQ Styles
.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 {
@bradpotter
bradpotter / functions.php
Last active June 1, 2021 15:12
Place a reusable Gutenberg block via a Genesis hook. (Where 956 is the Post ID of your reusable block)
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;
}