Instantly share code, notes, and snippets.

View text.html
<h1 class="hero-title" style="font-size:8vw;">Hello World</h1>
<p class="hero-text" style="font-size:2vw;">Resize the browser window to see how the font size scales.</p>
View functions.php
add_action( 'genesis_after_header', 'after_header_image' );
function after_header_image() {
$image = sprintf( '%s/images/after-header.jpg', get_stylesheet_directory_uri() );
$output = sprintf( '<img src="%s" class="after-header" alt="Image" />', $image );
echo $output;
}
View functions.php
add_action( 'genesis_before_footer', 'remove_essence_footer_cta' );
function remove_essence_footer_cta() {
if ( is_woocommerce() ) {
remove_action( 'genesis_before_footer', 'essence_footer_cta', 17 );
}
}
View functions.php
add_filter( 'woocommerce_enqueue_styles', 'wc_dequeue_styles' );
function wc_dequeue_styles( $enqueue_styles ) {
unset( $enqueue_styles['woocommerce-smallscreen'] );
return $enqueue_styles;
}
View functions.php
add_action( 'genesis_before_content_sidebar_wrap', 'if_elseif_else_code_test' );
function if_elseif_else_code_test() {
if ( is_front_page() ) {
echo '<p style="color:blue;">This prints on your front page</p>';
} elseif ( is_singular('post') ) {
echo '<p style="color:green;">This text prints on all single posts excluding your front page</p>';
} else {
echo '<p style="color:red;">Print this on all pages if all other conditions return false</p>';
View functions.php
add_action( 'wp_enqueue_scripts', 'load_ionicons' );
function load_ionicons() {
wp_enqueue_style( 'genesis-ionicons', '//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css', array(), CHILD_THEME_VERSION );
}
View functions.php
genesis_register_sidebar( array(
'id' => 'css-grid-widget',
'name' => __( 'Grid Widget', 'genesis' ),
) );
add_action( 'genesis_before_content_sidebar_wrap', 'front_page_grid_widget' );
function front_page_grid_widget() {
genesis_widget_area( 'css-grid-widget', array(
'before' => '<div class="grid-container">',
View functions.php
add_action( 'genesis_entry_footer', 'single_post_adjacent_entry_nav_genesis' );
function single_post_adjacent_entry_nav_genesis() {
if ( ! is_singular() ) {
return;
}
genesis_markup( array(
'open' => '<div %s>',
View front-page.php
<?php
/**
* Magazine Pro.
*
* This file adds the front page to the Magazine Pro Theme.
*
* @package Magazine
* @author Brad Dalton
* @license GPL-2.0+
* @link https://wp.me/p1lTu0-hEI
View section-1.html
<div class="widget"><div class="content">
<h1>Heading</h1>
<h2>Sub Heading</h2>
<p>Lorem ipsum dolor sit amet, an his etiam torquatos. Tollit soleat phaedrum te duo, eum cu recteque expetendis neglegentur. Cu mentitum maiestatis persequeris pro, pri ponderum tractatos ei.</p>
</div></div>