This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Variables used in this script: | |
// $summary - text title of the event | |
// $datestart - the starting date (in seconds since unix epoch) | |
// $dateend - the ending date (in seconds since unix epoch) | |
// $address - the event's address | |
// $uri - the URL of the event (add http://) | |
// $description - text description of the event | |
// $filename - the name of this file for saving (e.g. my-event-name.ics) | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.gform_wrapper .ginput_complex label { | |
font-size: 14px; | |
font-style: italic; | |
color: #a1a1a1; | |
padding-left: 5px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add the ability to remove a single event from a series with a checkbox (using CMB for metaboxes) | |
* | |
* Uses Bill Erickon's BE-Events-Calendar, however this example uses Custom Metaboxes & Fields (CMB) for the events meta options | |
* | |
* @author Joshua David Nelson | |
*/ | |
// Remove event from series |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'soliloquy_fc_query_args', 'rover_save_soliloquy_query', 1, 3 ); | |
function rover_save_soliloquy_query( $query_args, $id, $data ) { | |
// Only show posts with featured images | |
$query_args['meta_query'] = array( | |
array( | |
'key' => '_thumbnail_id', | |
) | |
); | |
return $query_args; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Example code showing how to hook WordPress to add fields to the taxonomny term edit screen. | |
* | |
* This example is meant to show how, not to be a drop in example. | |
* | |
* This example was written in response to this question: | |
* | |
* http://lists.automattic.com/pipermail/wp-hackers/2010-August/033671.html | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove taxonomy meta from genesis themes | |
* | |
* @author Joshua David Nelson | |
*/ | |
// Remove Taxonomy Options (Title and Description) | |
add_action( 'admin_init', 'genesis_add_taxonomy_archive_options' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Move page title on taxonomy pages | |
add_action( 'genesis_meta', 'jdn_move_category_title' ); | |
function jdn_move_category_title() { | |
if( is_archive() ) { | |
// Remove the default location for the breadcrumbs and taxonomy title-description | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
// Place the title-descript above the wrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set Genesis Theme Options programatically | |
* | |
* @author Joshua David Nelson | |
*/ | |
/** | |
* Information Metabox Options | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add to your theme functions file | |
*/ | |
// Add query variable | |
add_filter( 'query_vars', 'jdn_add_query_vars' ); | |
function jdn_add_query_vars( $vars ){ | |
$vars[] = "yr"; | |
return $vars; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom Query for custom archive page | |
* See: http://www.billerickson.net/code/wp_query-arguments/ | |
*/ | |
function jdn_custom_query() { | |
$args = array( | |
'posts_per_page' => 7, | |
'post_type' => 'post', | |
'orderby' => 'date', |