Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
WebEndevSnippets / genesis_site_layout.php
Created October 20, 2012 23:11 — forked from wpsmith/genesis_site_layout.php
Genesis: Force Specific Layout on a page
/**** Truly Force Layout without allowing the User to Override the preferred/recommended layout ****/
// Force Full Width Layout
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
// Force Content-Sidebar Layout
add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' );
// Force Sidebar-Content Layout
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_content' );
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@cdils
cdils / archive-testimonials.php
Created March 13, 2013 13:49
Testimonial Archive Template
<?php
/**
* Template Name: Testimonial Archives
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive
*/
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop
@surefirewebserv
surefirewebserv / gist:5504412
Created May 2, 2013 18:49
Much Simpler Grid Loop. Takes the post class and adds the column class to it. Also takes the first x posts and removes that class, which poses as a "featured" type of post. No crazy manipulation, just messing with classes and adding the right size images... Blog Post To come...
<?php
add_action('genesis_before_post_title', 'sfws_homepage_teaser_image');
/**
* Adds Images to Posts in Grid
*
* Takes the amount of posts and applies the right size image, whether it's a featured post or a grid block post.
*
* @category Grid Loop
* @author Jonathan Perez, SureFireWebServices <jperez@surefirewebservices.com>
@levymetal
levymetal / direct_parent.php
Last active November 27, 2023 04:17
Custom Wordpress function which uses a nav walker to display a list of child pages from a common parent, which can be called from either the parent page (displays children) or any of the child pages (displays siblings). Detailed instructions available on my blog post here: http://christianvarga.com/how-to-get-submenu-items-from-a-wordpress-menu-…
<?php
wp_nav_menu( array(
'menu' => 'Menu Name',
'sub_menu' => true,
'direct_parent' => true
) );
@jdevalk
jdevalk / archive-speaking_event.php
Last active December 12, 2021 20:13
Genesis helper code for schema
<?php
add_filter( 'genesis_attr_content', 'yoast_schema_empty', 20 );
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 );
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 );
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 );
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 );
/**
* We'll use the post info output to add more meta data about the event.
function add_genesis_before_post () {
echo '<div class="before-post">genesis_before_post</div>';
};
add_action('genesis_before_post', 'add_genesis_before_post');
function add_genesis_before_post_title() {
echo '<div class="before-post-title">genesis_before_post_title</div>';
@JiveDig
JiveDig / gist:5754159
Last active December 18, 2015 08:29
Fix checkbox and radio button styling in Genesis
input[type="checkbox"],
input[type="radio"] {
width: 20px;
margin: 0 0 3px 3px;
vertical-align: middle;
}
@justintadlock
justintadlock / register-post-type.php
Last active October 22, 2023 05:55
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@GaryJones
GaryJones / readme.md
Last active July 14, 2019 20:46
Custom Featured Post Widget plugin: Skeleton for amending the output of the Genesis Featured Post widget.