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' ); |
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 ); |
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'); |
View additional.css
/* Set the alignment of the Genesis Simple Share Icons | |
-------------------------------------------------------- */ | |
.sharre-icon-wrap { | |
margin: 20px 0; | |
text-align: center; | |
} |
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' ) ) { |
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 |
View additional.css
/* 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) { | |
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 |
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">', |
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' ); |
NewerOlder