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
/* My metabox array */ | |
array( | |
'name' => 'Start Date', | |
'desc' => 'Project Start Date', | |
'id' => 'startdate', | |
'type' => 'text_date', | |
), | |
/* My query function */ | |
function mmi_projects_loop () { |
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
array( | |
'name' => 'Project Type', | |
'desc' => 'Select all that apply to this project', | |
'id' => 'project_type', | |
'type' => 'multicheck', | |
'options' => array( | |
'admin' => 'Administration', | |
), | |
), |
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
/* | |
Theme Name: Medical Ministry Child Theme | |
Theme URI: http://medicalministrytrips.org | |
Description: Medical Ministry Child theme is a two or three column child theme created for the Genesis Framework. | |
Author: Media317 | |
Author URI: http://media317.net | |
Version: 2.0 | |
Tags: blue, gray, white, one-column, two-columns, three-columns, left-sidebar, right-sidebar, fixed-width, custom-background, custom-header, custom-menu, full-width-template, sticky-post, theme-options, threaded-comments |
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
#mediaspace_wrapper { | |
position: relative; | |
height: 0; | |
padding-bottom: 59%; | |
padding-top: 0; | |
} | |
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 Project Information After Content */ | |
add_action ( 'genesis_sidebar', 'mmi_sing_project_side' ); | |
function mmi_sing_project_side() { | |
global $wp_query; | |
$participants = $wp_query->post->ID; | |
echo '<div class="mmi-sidebar">'; | |
echo '<section class="widget">'; | |
echo '<h4 class="widgettitle">Participate In This Project</h4>'; |
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 new image sizes */ | |
// ( 'name', width, height, crop) | |
add_image_size( 'Featured', 1040, 400, TRUE ); |
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 image sizes to Media Selection */ | |
add_filter('image_size_names_choose', 'me_display_image_size_names_muploader', 11, 1); | |
function me_display_image_size_names_muploader( $sizes ) { | |
$new_sizes = array(); | |
$added_sizes = get_intermediate_image_sizes(); | |
// $added_sizes is an indexed array, therefore need to convert it | |
// to associative array, using $value for $key and $value |
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
I cannot seem to get this to work... I'm on Genesis 1.9.2 | |
My CPT Projects has several metaboxes. I have four image/file upload metaboxes. I am using the following for the boxes: | |
array( | |
'name' => 'Main Project Image', | |
'desc' => 'Upload an image or enter an URL for the Main Image', | |
'id' => $prefix . '_main_project_img', | |
'type' => 'file', | |
'save_id' => true, // save ID using true |
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 | |
/** | |
* The custom Projects post type single post template | |
*/ | |
/** Remove standard Genesis Loop */ | |
remove_action( 'genesis_loop' , 'genesis_do_loop' ); | |
/** Add custom loop for Portfolio page */ | |
add_action( 'genesis_loop', 'me_portfolio' ); |
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 a default avatar to Settings > Discussion | |
if ( !function_exists('media317_addgravatar') ) { | |
function media317_addgravatar( $avatar_defaults ) { | |
$myavatar = get_bloginfo('stylesheet_directory') . '/images/avatar.jpg'; // Make sure to add the images directory to theme | |
$avatar_defaults[$myavatar] = 'Media317'; //Add a default name for the Avatar | |
return $avatar_defaults; | |
} | |
add_filter( 'avatar_defaults', 'fb_addgravatar' ); |