Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
cre8tivediva / page_archive.php
Created Feb 3, 2020
Genesis 2.8 Copy of page_archive.php file
View page_archive.php
<?php
/**
* Genesis Framework.
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* Template Name: Archive
*
* @package Genesis\Templates
@cre8tivediva
cre8tivediva / functions.php
Created Nov 1, 2019
Add a full width widget area before footer widgets in Magazine Pro
View functions.php
//* Add a full width widget area before footer widgets in Magazine Pro
genesis_register_sidebar( array(
'id' => 'before-footer-widgets',
'name' => __( 'Before Footer Widgets', 'genesis' ),
'description' => __( 'This is the before footer widget.', 'themename' ),
) );
add_action( 'genesis_before_footer', 'c8d_before_footer_widget', 3 );
function c8d_before_footer_widget() {
genesis_widget_area( 'before-footer-widgets', array(
'before' => '<div class="before-footer-widgets widget-area">',
@cre8tivediva
cre8tivediva / gist:f7fccc719470f177b74dca6b48cdbc2d
Created Sep 17, 2018
Display One Category on the Home Page
View gist:f7fccc719470f177b74dca6b48cdbc2d
// Display one category on the home page
function c8d_display_one_category_home( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'cat', 'ENTER YOUR CATEGORY ID NUMBER HERE' );
}
}
add_action( 'pre_get_posts', 'c8d_display_one_category_home' );
@cre8tivediva
cre8tivediva / gist:f20b913197d5cf719cd8114d183c5661
Created Sep 16, 2018
Essence Pro (Genesis) Archive Posts Side by Side like Blog Page
View gist:f20b913197d5cf719cd8114d183c5661
/* Essence Pro Archive Posts Side by Side like Blog Page
---------------------------------------------------------------------------------------------------- */
.archive .content {
max-width: none;
width: 100%;
}
.archive .content .entry {
float: left;
@cre8tivediva
cre8tivediva / Force content-sidebar layout on blog (Genesis) Force content-sidebar layout on blog posts when your default layout is full-width content
View Force content-sidebar layout on blog (Genesis)
//* 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;
}
}
View color-button.css
/* Color Buttons
------------------------------------------------------------ */
.button-blue,
.button-gray,
.button-green,
.button-purple,
.button-red,
.button-yellow {
color: #fff;
@cre8tivediva
cre8tivediva / Clear fix for Genesis Column Classes
Created Apr 1, 2018 — forked from ifamily/Clear fix for Genesis Column Classes
This CSS will fix problems caused by Genesis Column Classes of uneven height. Just add a div with the class name of clear-line to your code. Then add this to your .css file.
View Clear fix for Genesis Column Classes
/*
Clear fix for column classes
---------------------------------------------------------------------------------------------------- */
.clear-line:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
@cre8tivediva
cre8tivediva / columns.css
Created Apr 1, 2018 — forked from studiopress/columns.css
Genesis column classes.
View columns.css
/* Column Classes
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.one-fourth,
.one-half,
.one-sixth,
.one-third,
@cre8tivediva
cre8tivediva / content.php
Created Dec 27, 2017
Responsive Video iFrame Code
View content.php
<div class="video-code">ADD YOUR IFRAME</div>
@cre8tivediva
cre8tivediva / page_landing.php
Last active Dec 19, 2017
Custom Landing Page for Swank Child Theme
View page_landing.php
<?php
/**
* Custom Landing Page for the Swank Child Theme
*
* This file adds the landing page template to the Swank Child Theme.
*
* Template Name: Landing
*
* @package Custom Landing Page for Swank
* @author Anita Carter