Skip to content

Instantly share code, notes, and snippets.

View cre8tivediva's full-sized avatar

Anita cre8tivediva

  • 07:22 (UTC -04:00)
View GitHub Profile
@cre8tivediva
cre8tivediva / additional.css
Last active September 1, 2021 05:08
Use Genesis Simple Share with Genesis Blocks Post/Page Grid until Script Error has been fix
/* Set the alignment of the Genesis Simple Share Icons
-------------------------------------------------------- */
.sharre-icon-wrap {
margin: 20px 0;
text-align: center;
}
@cre8tivediva
cre8tivediva / bp-custom.php
Created November 8, 2020 23:02
Remove User from BuddyPress
/**
* Exclude users from BuddyPress members list.
*
* @param array $args args.
*
* @return array
*/
function buddydev_exclude_users( $args ) {
// do not exclude in admin.
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
@cre8tivediva
cre8tivediva / page_landing.php
Created October 8, 2020 18:40
Custom Landing Page for Simply Pro Child Theme which was not included in original file
<?php
/**
* Custom Simply Pro Landing Page
*
* This file adds the custom landing page template to the Simply Pro Theme.
*
* Template Name: Landing
*
* @package Simply Pro
* @author Cre8tive Diva
@cre8tivediva
cre8tivediva / additional.css
Created April 14, 2020 13:25
Magazine Pro - Change Full Width on Desktop to 800px (75%) and Return Mobile 840px to 100%
/* Make Full Width Content 800px or 75% on Desktop Only */
.full-width-content .content {
width: 70%;
margin: 0 auto;
float: none;
}
/* Return Full Width Content to 100% on Media Query 840px */
@media only screen and (max-width: 840px) {
@cre8tivediva
cre8tivediva / page_archive.php
Created February 3, 2020 02:10
Genesis 2.8 Copy of page_archive.php file
<?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 November 1, 2019 21:57
Add a full width widget area before footer widgets in Magazine Pro
//* 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 September 17, 2018 14:00
Display One Category on the Home Page
// 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 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;
@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 / 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;