Skip to content

Instantly share code, notes, and snippets.

Brad Dalton braddalton

Block or report user

Report or block braddalton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@braddalton
braddalton / homepage.html
Created Jan 31, 2020
Revolution Pro - Remove cover image https://wp.me/p1lTu0-iSe
View homepage.html
<!-- wp:image {"id":1935,"align":"full"} -->
<figure class="wp-block-image alignfull"><img src="http://new.local/wp-content/themes/revolution-pro/config/import/images/windows.jpg" alt="" class="wp-image-1935"/></figure>
<!-- /wp:image -->
View display-widget-full-width.php
'before' => '<div class="home-top widget-area">',
'after' => '</div>',
@braddalton
braddalton / functions.php
Created Jan 17, 2020
Horizontally Display Genesis Featured Posts Inline In One Widget Area https://wp.me/p1lTu0-fmq
View functions.php
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'education' ),
'description' => __( 'This is the top section of the Home page.', 'education' ),
) );
add_action( 'genesis_after_header', 'education_home_top_widget' );
function education_home_top_widget() {
if ( is_active_sidebar( 'home-top' ) ) {
genesis_widget_area( 'home-top', array(
View functions.php
add_filter( 'body_class', 'essence_add_body_class_exclude_front_page' );
function essence_add_body_class_exclude_front_page( $classes ) {
if ( ! is_front_page() ) {
$classes[] = 'exclude-front-hero';
}
return $classes;
View functions.php
genesis_register_sidebar( array(
'id' => 'before-header',
'name' => __( 'Before Header', 'genesis-sample' ),
'description' => __( 'Before Header Widget Area Site Wide', 'genesis-sample' ),
) );
add_action( 'genesis_before_header', 'add_widget_before_header', 5 );
function add_widget_before_header() {
View functions.php
add_action( 'genesis_entry_content', 'function_name', 12 );
function function_name() {
if ( is_category( 'demo' ) )
$value = get_post_meta( get_the_ID(), 'key', true );
if ( ! empty( $value ) ) {
echo '<div class="your-class">'. $value .'</div>';
@braddalton
braddalton / functions.php
Last active Jan 4, 2020
Step 2 - Conditionally Add New Widget Area Before Footer Widgets In Genesis https://wpsites.net/web-design/add-new-widget-area-before-footer-widgets-in-genesis/#step-2
View functions.php
genesis_register_sidebar( array(
'id' => 'before-footer',
'name' => __( 'Before Footer' ),
) );
add_action( 'genesis_before_footer', 'before_footer_widget_area', 5 );
function before_footer_widget_area() {
if ( ! is_front_page() )
return;
View functions.php
genesis_register_sidebar( array(
'id' => 'before-footer',
'name' => __( 'Before Footer' ),
) );
add_action( 'genesis_before_footer', 'before_footer_widget_area', 5 );
function before_footer_widget_area() {
genesis_widget_area( 'before-footer', array(
'before' => '<div class="before-footer"><div class="wrap">',
View functions.php
add_action( 'genesis_after_header', 'mega_menu', 25 );
function mega_menu() {
wp_nav_menu( array( 'theme_location' => 'max_mega_menu_1' ) );
}
@braddalton
braddalton / output.php
Last active Jan 1, 2020
Step 4 : On line 26 of lib > output.php.modify the code like this : https://wpsites.net/web-design/add-front-page-7-widget-to-wellness-pro/#step-4
View output.php
$opts = apply_filters( 'wellness_images', array( '1', '3', '5', '7' ) );
You can’t perform that action at this time.