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 | |
//Don't include PHP tag | |
// Customize the footer section | |
add_filter('genesis_footer_creds_text', 'bdfg_footer_creds_text'); | |
function bdfg_footer_creds_text($creds) { | |
global $wpdb; | |
$table = $wpdb->prefix . 'posts'; | |
$lastDate = date('Y'); | |
$firstDate = $wpdb->get_var("SELECT YEAR(post_date) FROM $table ORDER BY post_date LIMIT 1"); |
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
jQuery(window).load(function() { | |
jQuery("#ninja_forms_widget-2 select option:selected").attr('disabled','disabled') | |
.siblings().removeAttr('disabled'); | |
}); |
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 | |
/** | |
* 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 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 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 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 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 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 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 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' ), |
OlderNewer