This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>get_title</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="childtheme/style.css"> | |
<link rel="shortcut icon" href="childtheme/images/favicon.ico"> | |
This file contains hidden or 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
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_before_loop', 'child_maybe_do_grid_loop' ); | |
function child_maybe_do_grid_loop() { | |
// Amend this conditional to pick where this grid looping occurs | |
if ( is_page('bbtestpage') ) { | |
remove_action('genesis_before_post_content', 'genesis_post_info'); | |
This file contains hidden or 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 Editor Styles within a WP Child theme*/ | |
add_editor_style(); //This will use the default styles of your child theme stylesheet. | |
/** Add Editor Styles for WP Themes */ | |
add_editor_style( 'custom-editor-style.css' ); |
This file contains hidden or 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' ); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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; | |
} | |
OlderNewer