Skip to content

Instantly share code, notes, and snippets.

View dougedgington's full-sized avatar

Doug Edgington dougedgington

View GitHub Profile
@dougedgington
dougedgington / functions.php
Last active December 15, 2015 15:39
Register Sidebar called top-message with the Genesis Framework
<?php
/*
Description: Top message sidebar with the Genesis Framework
*/
genesis_register_sidebar( array(
'id' => 'top-message',
'name' => __( 'Top Message', 'themename' ),
'description' => __( 'This is the top of site message widget area.', 'themename' ),
) );
<?php
/*enable shortcode in text widget*/
add_filter('widget_text', 'do_shortcode');
<?php
/*
Author: Doug Edgington
Description: Shortcode to output recent posts from one category
*/
function dee_display_recent_posts() {
$args = array(
'post_type' => 'post',
'posts_per_page'=> 5,
'cat'=> 4,
@dougedgington
dougedgington / shortcodes.php
Last active December 15, 2015 03:19
Output custom post type in a grid via shortcode in WordPress.
<?php
/*
Author: Doug Edgington
Description: Shortcode to output custom post type in a grid
*/
function dee_display_bios() {
$args = array(
'post_type' => 'dee_bios',
'orderby' => 'title',