Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
cre8tivediva / functions.php
Last active October 13, 2021 06:30
Rename the Genesis Portfolio Slug
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
/**
* Rename slug in Genesis Portfolio Plugin.
*
* @author Anita Carter
* @link https://cre8tivediva.com/rename-genesis-portfolio-slug
*/
function rename_portfolio_custom_post_type_slug() {
@cre8tivediva
cre8tivediva / functions.php
Last active September 19, 2017 20:29
Add Color Selector and New Color to Maker Pro Child Theme
//* Add support for additional color style options
add_theme_support( 'genesis-style-selector', array(
'maker-dark' => __( 'Maker Dark', 'maker' ),
'maker-medium' => __( 'Maker Medium', 'maker' ),
) );
@cre8tivediva
cre8tivediva / functions.php
Last active November 25, 2017 19:39
Add Comments to Portfolio Post Type
// Add Comments to Portfolio Custom Post Type (https://codex.wordpress.org/Function_Reference/add_post_type_support)
function add_comments_portfolio() {
add_post_type_support( 'portfolio', 'comments' );
}
add_action( 'init', 'add_comments_portfolio', 11 );
@cre8tivediva
cre8tivediva / page_landing.php
Last active December 19, 2017 04:19
Custom Landing Page for Swank Child Theme
<?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
@cre8tivediva
cre8tivediva / content.php
Created December 27, 2017 18:44
Responsive Video iFrame Code
<div class="video-code">ADD YOUR IFRAME</div>
@cre8tivediva
cre8tivediva / columns.css
Created April 1, 2018 20:39 — forked from studiopress/columns.css
Genesis column classes.
/* 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 / Clear fix for Genesis Column Classes
Created April 1, 2018 20:40 — 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.
/*
Clear fix for column classes
---------------------------------------------------------------------------------------------------- */
.clear-line:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
@cre8tivediva
cre8tivediva / color-button.css
Created July 24, 2018 02:40 — forked from studiopress/color-button.css
Colored Content Boxes
/* Color Buttons
------------------------------------------------------------ */
.button-blue,
.button-gray,
.button-green,
.button-purple,
.button-red,
.button-yellow {
color: #fff;
@cre8tivediva
cre8tivediva / Force content-sidebar layout on blog (Genesis)
Created July 24, 2018 16:04 — forked from nutsandbolts/Force content-sidebar layout on blog (Genesis)
Force content-sidebar layout on blog posts when your default layout is full-width content
//* 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;
}
}
@cre8tivediva
cre8tivediva / gist:f20b913197d5cf719cd8114d183c5661
Created September 16, 2018 02:27
Essence Pro (Genesis) Archive Posts Side by Side like Blog Page
/* Essence Pro Archive Posts Side by Side like Blog Page
---------------------------------------------------------------------------------------------------- */
.archive .content {
max-width: none;
width: 100%;
}
.archive .content .entry {
float: left;