Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
cre8tivediva / additional.css
Created January 15, 2022 01:52
Custom Style for Genesis Simple Share
View additional.css
/* Genesis Simple Share - uses Genericons
--------------------------------------------- */
/* Centers the icons */
.share-before, .share-after {
overflow: auto;
text-align: center;
}
.sharrre {
@cre8tivediva
cre8tivediva / functions.php
Last active October 13, 2021 06:30
Rename the Genesis Portfolio Slug
View functions.php
<?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 / 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
View additional.css
/* Set the alignment of the Genesis Simple Share Icons
-------------------------------------------------------- */
.sharre-icon-wrap {
margin: 20px 0;
text-align: center;
}
@cre8tivediva
cre8tivediva / page_blog.php
Created August 7, 2021 00:59 — forked from studiopress/page_blog.php
Genesis page content on blog template.
View page_blog.php
<?php
//* Template Name: Blog
//* Show page content above posts
add_action( 'genesis_loop', 'genesis_standard_loop', 5 );
genesis();
@cre8tivediva
cre8tivediva / style.css
Last active June 24, 2021 11:21
Display Blog Posts in Grid on Blog Page Genesis without a Plugin
View style.css
/* Create a page called Blog.
Go to Layout Settings. Add the word "blog" (without quotes) to the Custom Body Class, then Save.
Add the following code to the stylesheet or to the Additional CSS Box.
*/
/* Blog Page Grid Layout
-----------------------------------------------------*/
.blog .content .entry {
border:0;
float:left;
@cre8tivediva
cre8tivediva / functions.php
Last active January 16, 2021 18:40
Force full width layout on search resuls page
View functions.php
//* Force Full Width Layout on Search Results Pages
function c8d_posts_full_layout() {
if( is_search () ){
return 'full-width-content';
}
}
add_filter( 'genesis_site_layout', 'c8d_posts_full_layout' );
@cre8tivediva
cre8tivediva / dequeue-script-example.php
Created January 6, 2021 21:05 — forked from helgatheviking/dequeue-script-example.php
Code snippet for dequeing a script on the single produt page
View dequeue-script-example.php
function kia_unload_script() {
if ( function_exists( 'is_product' ) && is_product() ) {
wp_dequeue_script( 'wc-single-product' );
}
}
add_action( 'wp_enqueue_scripts', 'kia_unload_script', 20 );
@cre8tivediva
cre8tivediva / functions.php
Last active December 18, 2020 01:51
Add pagination to Genesis Author Archives
View functions.php
//* Add pagination to Genesis Author Archive
function author_posts_per_page( $query ) {
if (!is_admin() && is_author() )
$query->set( 'posts_per_page', 5 );
}
add_filter('parse_query', 'author_posts_per_page');
@cre8tivediva
cre8tivediva / bp-custom.php
Created November 8, 2020 23:02
Remove User from BuddyPress
View bp-custom.php
/**
* 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
View page_landing.php
<?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