Skip to content

Instantly share code, notes, and snippets.

View gist:18cc4958e9dc0f3aa4e8
<?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 Aug 29, 2015
Add signature via Functions (working code) Use with Portfolio Custom Post Type
View new-signature
//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" );
View simple-social-centered.css
/* 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
Add Sidebar CSS to Remobile
View gist:26e426d7ef450d237649
/* 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 Aug 23, 2015
Simple Social Icons Colored Backgrounds
View style.css
/*
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 Jul 2, 2016
Display Featured Image on Single Posts in Genesis
View functions.php
// 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 Aug 7, 2016
Responsive Mobile CSS for Fun Theme When using Full Width Header
View style.css
//* 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 Feb 9, 2017
Hide Previous/Next Arrows and Pager Link Buttons from Free Version of Soliloquy
View style.css
/*
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 Mar 1, 2017
Related Posts by One Category (modified from Nick Croft's code - http://designsbynickthegeek.com/tutorials/related-posts-genesis)
View functions.php
//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 Apr 9, 2017
Add Simple Product CPT
View functions.php
// 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' ),