Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
cre8tivediva / gist:18cc4958e9dc0f3aa4e8
Created August 9, 2014 19:54
C8D Front Page Code
<?php
/**
* This file adds the Home Page to the Tidy Theme.
*/
add_action( 'genesis_meta', 'tidy_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
@cre8tivediva
cre8tivediva / new-signature
Last active August 29, 2015 14:16
Add signature via Functions (working code) Use with Portfolio Custom Post Type
//Add Signature Link
function custom_content_after_post($content){
if (is_singular( 'post' )) {
$content .= '<p>Load Your Content Here</p><img src="#" alt="Your Name" />';
}
return $content;
}
add_filter( "the_content", "custom_content_after_post" );
/* Align Simple Social Icons Centered */
.simple-social-icons ul.alignright,
.simple-social-icon ul.alignleft {
text-align: center;
}
.simple-social-icons ul.alignright li,
.simple-social-icons ul.alignleft li {
display: inline-block;
float: none;
@cre8tivediva
cre8tivediva / gist:26e426d7ef450d237649
Created May 23, 2015 16:23
Add Sidebar CSS to Remobile
/* Wrapping div for .content and .sidebar-primary */
.content-sidebar-sidebar .content-sidebar-wrap,
.sidebar-content-sidebar .content-sidebar-wrap,
.sidebar-sidebar-content .content-sidebar-wrap {
width: 920px;
}
.content-sidebar-sidebar .content-sidebar-wrap {
float: left;
@cre8tivediva
cre8tivediva / style.css
Created August 23, 2015 23:22
Simple Social Icons Colored Backgrounds
/*
Custom simple social icons
---------------------------------------------------------------------------------------------------- */
.simple-social-icons ul li.social-bloglovin a,
.simple-social-icons ul li.social-bloglovin a:hover {
background: #1c82e9 !important;
}
.simple-social-icons ul li.social-dribbble a,
@cre8tivediva
cre8tivediva / functions.php
Last active July 2, 2016 02:27
Display Featured Image on Single Posts in Genesis
// Display Featured Image Above the Title on Single Posts
add_action('genesis_before_entry', 'featured_post_image', 8);
function featured_post_image() {
if (!is_singular('post')) return;
the_post_thumbnail('post-image');
}
@cre8tivediva
cre8tivediva / style.css
Created August 7, 2016 15:16
Responsive Mobile CSS for Fun Theme When using Full Width Header
//* Place all code in the Media Queries area
@media only screen and (max-width: 1280px) {
.header-image .site-title a {
background-size: contain !important;
height: 0;
min-height: 286px;
}
}
@cre8tivediva
cre8tivediva / style.css
Created February 9, 2017 06:32
Hide Previous/Next Arrows and Pager Link Buttons from Free Version of Soliloquy
/*
Hide Previous/Next Arrows and Pager Link Buttons from Free Version of Soliloquy
---------------------------------------------------------------------------------------------------- */
.soliloquy-container .soliloquy-prev,
.soliloquy-container .soliloquy-next,
.soliloquy-container .soliloquy-pager-link {
display: none !important;
}
@cre8tivediva
cre8tivediva / functions.php
Last active March 1, 2017 21:37
Related Posts by One Category (modified from Nick Croft's code - http://designsbynickthegeek.com/tutorials/related-posts-genesis)
//for XHTML themes
add_action( 'genesis_after_post_content', 'child_related_posts' );
//for HTML5 themes
add_action( 'genesis_after_entry_content', 'child_related_posts' );
/**
* Outputs related posts with thumbnail
*
* @author Nick the Geek
* @url http://designsbynickthegeek.com/tutorials/related-posts-genesis
* @global object $post
@cre8tivediva
cre8tivediva / functions.php
Created April 9, 2017 00:32
Add Simple Product CPT
// Register Custom Post Type
function products_post_type() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Products', 'text_domain' ),
'name_admin_bar' => __( 'Product', 'text_domain' ),
'archives' => __( 'Item Archives', 'text_domain' ),
'attributes' => __( 'Item Attributes', 'text_domain' ),