Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // customize single post header content for dx5
- add_action( 'genesis_entry_header', 'dx5_do_post_header');
- function dx5_do_post_header() {
- genesis_markup( array(
- 'html5' => '<header %s>',
- 'context' => 'dx5-post-heading',
- ) );
- // find featured image for post
- $img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "full")[0];
- $tag_list = get_the_tag_list( '<ul><li>','</li><li>','</li></ul>' );
- // Added in content
- echo '<div class="dx5-post-heading clearfix">
- <div class="dx5-post-feature-image dx5-left"><img src="'. $img .'" /></div>
- <div class="dx5-post-title-info dx5-right">
- <h1>'. get_the_title() .'</h1>
- <h2>'. get_the_excerpt() .'</h2>
- <div class="tags">Tags: '. $tag_list .'</div>
- <div class="cookbook-recipe-times">'.dx5_all_recipe_prep_times() .'</div>
- </div>
- </div>';
- genesis_structural_wrap( 'header' );
- }
- remove_action( 'cookbook_recipe_top', 'cookbook_recipe_time', 12 );
- function dx5_all_recipe_prep_times( $recipe ) {
- $recipe_ids = cookbook_get_embedded_recipe_ids();
- if ( empty( $recipe_ids ) ) {
- return;
- }
- foreach ( $recipe_ids as $recipe_id ) {
- $recipe = cookbook_get_recipe( $recipe_id );
- if ( $recipe ) {
- echo cookbook_template_prep_time($recipe) . cookbook_template_cook_time($recipe) . cookbook_template_total_time($recipe);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement