This file contains hidden or 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 | |
// Display custom logo | |
add_action( 'genesis_site_title', 'the_custom_logo', 0 ); |
This file contains hidden or 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 | |
// Add custom logo or Enable option in Customizer > Site Identity | |
add_theme_support( 'custom-logo', array( | |
'width' => 244, | |
'height' => 315, | |
'flex-width' => true, | |
'flex-height' => true, | |
'header-text' => array( '.site-title', '.site-description' ), |
This file contains hidden or 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 default layouts | |
genesis_unregister_layout( 'content-sidebar' ); | |
genesis_unregister_layout( 'content-sidebar-sidebar' ); | |
genesis_unregister_layout( 'sidebar-sidebar-content' ); | |
genesis_unregister_layout( 'sidebar-content-sidebar' ); |
This file contains hidden or 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 | |
// Register a custom image size for Singular Post and Page Featured images | |
add_image_size( 'singular-featured-thumb', 880, 450, true ); // Hard Crop Mode | |
// Display featured image above content | |
add_action( 'genesis_before_entry', 'display_featured_image' ); | |
function display_featured_image() { | |
if ( ! is_singular( array( 'post', 'page' ) ) ) { |
This file contains hidden or 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
#hero-img { | |
background: #3B5998; | |
background: -moz-linear-gradient(to right, #3b5a9b 0%,#5387f4 100%); | |
background: -webkit-linear-gradient(to right, #3b5a9b 0%,#5387f4 100%); | |
background: url(svg/pattern-right.svg), linear-gradient(to right, #3b5a9b 0%,#5387f4 100%); | |
background-position: left center,center center; | |
background-repeat: no-repeat,no-repeat; | |
background-size: 675px 600px, cover; | |
} |
This file contains hidden or 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
To get rid of leading space(s) and all empty lines (even if the empty line contains spaces or tabs) | |
# Go to Search -> Replace | |
# Select "Regular expression" under Search mode. | |
# Use ^\s* for "Find what" and leave "Replace with" blank. | |
# Click Replace all | |
Regex explanation: | |
# ^ means beginning of the line | |
# \s* means any number (even 0) of whitespace characters. Whitespace characters include tab, space, newline, and carriage return. |
This file contains hidden or 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 | |
// Register a custom image size for Singular Page Featured images | |
add_image_size( 'singular-page-featured-thumb', 1277, 300, true ); | |
// Display image before content-sidebar-wrap | |
add_action( 'genesis_before_content_sidebar_wrap', 'page_display_featured_image' ); | |
function page_display_featured_image() { | |
if ( ! is_singular( array( 'page' ) ) ) { |
This file contains hidden or 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 | |
/** | |
* Register `code` post type | |
*/ | |
function code_post_type() { | |
// Labels | |
$labels = array( |
This file contains hidden or 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 | |
/** | |
* Template Name: Code Snippets Archive | |
* Description: Used as a page template to show custom-post-type 'code' | |
*/ | |
// Add 'code_snippet' ID | |
function be_site_inner_attr( $attributes ) { |
This file contains hidden or 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(window).load(function() { | |
jQuery("#ninja_forms_widget-2 select option:selected").attr('disabled','disabled') | |
.siblings().removeAttr('disabled'); | |
}); |