Your Time:
Our Time:

remove featured image and sidebar to right

Sorry, but you do not have the capability to view this topic

  • Resolved
    Posted in: Cook Pro  
  • Supported
    • Topics: 4
    • Replies: 22
    • Total posts: 26
    Not too shy to talk
    Post count: 22
    RecipeBrag
    Member
    2019-02-20 at 9:26 pm #24762

    Hi.

    Thank you for your help. I need your help to remove the featured image from single.php and create a single-recipe.php. Also if you look, you will see the sidebar fits at the bottom and not to the right: http://stephenlindenwyatt.co.uk/recipe/fluffy-cloud-eggs

    The single file code is:

    <?php get_header();?> <?php if (have_posts()) { while (have_posts()) { the_post(); $categories = get_the_category(); $tags = get_the_tags(); $post_id = get_the_ID(); $post_layout_display = get_post_meta( $post_id, ‘single_post_layout’, true ); $single_post_layout_options = get_theme_mod(‘single_post_layout_options’); if($post_layout_display "full_width_image_with_caption_overlay_center" || $post_layout_display “full_width_image_with_caption_overlay_bottom” || $post_layout_display "full_width_image_with_caption_above" || $single_post_layout_options “single_post_layout_7” || $single_post_layout_options "single_post_layout_8" || $single_post_layout_options “single_post_layout_9”){ }else{ ?> <?php }?> <!- begin content -> <?php if(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_2’){ $class_full_width_option = “single_full_width_custom_options options_admin_single_style1 ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_3’){ $class_full_width_option = “single_full_width_custom_options options_admin_single_style1 ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_4’){ $class_full_width_option = “single_full_width_custom_options options_admin_single_style1 ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_5’){ $class_full_width_option = “single_full_width_custom_options options_admin_single_style1 ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_6’){ $class_full_width_option = “single_full_width_custom_options options_admin_single_style1 ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_7’){ get_template_part(‘single-header-6’); $class_full_width_option = “single_full_width_custom_options ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_8’){ get_template_part(‘single-header-7’); $class_full_width_option = “single_full_width_custom_options ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_9’){ get_template_part(‘single-header-8’); $class_full_width_option = “single_full_width_custom_options ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_10’){ get_template_part(‘single-header-9’); $class_full_width_option = “single_full_width_custom_options ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_11’){ get_template_part(‘single-header-11’); $class_full_width_option = “single_full_width_custom_options ”; }elseif(get_theme_mod(‘single_post_layout_options’) == ‘single_post_layout_12’){ $class_full_width_option = “single_full_width_custom_options options_admin_single_style1 ”; }else{ if($post_layout_display == “full_width_image_with_caption_overlay_center”){ get_template_part(‘single-header-6’); $class_full_width_option = “single_full_width_custom_options ”; } elseif($post_layout_display == “full_width_image_with_caption_overlay_bottom”){ get_template_part(‘single-header-7’); $class_full_width_option = “single_full_width_custom_options ”; } elseif($post_layout_display == “full_width_image_with_caption_above”){ get_template_part(‘single-header-8’); $class_full_width_option = “single_full_width_custom_options ”; } elseif($post_layout_display == “full_width_caption_without_image”){ get_template_part(‘single-header-9’); $class_full_width_option = “single_full_width_custom_options ”; } elseif($post_layout_display == “full_width_caption_with_post_format”){ get_template_part(‘single-header-11’); $class_full_width_option = “single_full_width_custom_options ”; } elseif($post_layout_display == “title_below_align_left”){ $class_full_width_option = “single_bellow_left_align ”; } else{ $class_full_width_option = “single_box_width_custom_options ”; } } ?> <section id=”content_main” class=”clearfix”> loop-large-post” id=”content”> <!- start post -> id=”post-<?php the_ID();?>”> <?php if(get_theme_mod(‘single_post_layout_options’) 'single_post_layout_4'){ get_template_part('single-header-3'); }elseif(get_theme_mod('single_post_layout_options') ‘single_post_layout_5’){ get_template_part(‘single-header-4’); }elseif(get_theme_mod(‘single_post_layout_options’) 'single_post_layout_7'){ }elseif(get_theme_mod('single_post_layout_options') ‘single_post_layout_8’){ }elseif(get_theme_mod(‘single_post_layout_options’) 'single_post_layout_9'){ }elseif(get_theme_mod('single_post_layout_options') ‘single_post_layout_10’){ }elseif(get_theme_mod(‘single_post_layout_options’) 'single_post_layout_11'){ }elseif(get_theme_mod('single_post_layout_options') ‘single_post_layout_12’){ get_template_part(‘single-header-10’); }else{ if($post_layout_display "title_below_align_left"){ get_template_part('single-header-3'); } elseif($post_layout_display “title_above_align_left”){ get_template_part(‘single-header-4’); } elseif($post_layout_display "caption_without_image"){ get_template_part('single-header-10'); } else{ if($post_layout_display “full_width_image_with_caption_overlay_center” || $post_layout_display "full_width_image_with_caption_overlay_bottom" || $post_layout_display “full_width_image_with_caption_above” || $post_layout_display "full_width_caption_without_image" || $post_layout_display “full_width_caption_with_post_format”){ }else{ get_template_part(‘single-header-3’); } } } ?> <?php the_content(); ?> <?php wp_link_pages( array( ‘before’ => ‘
    ’, ‘after’ => ‘
    ’, ‘link_before’ => ‘
    ’, ‘link_after’ => ‘
    ’ ) ); ?> <?php if(get_theme_mod(‘disable_post_tag’) !=1){?> <?php if (!empty($tags)){ ?> <?php the_tags(‘
    ’, ‘
    ’, ‘
    ‘); ?> <?php } ?> <?php }?> </section> <!- end content -> <?php get_footer(); ?> <?php if(get_theme_mod(‘disable_post_share’) !=1){ if(function_exists(‘disto_single_share_link’)){?> <?php esc_html_e(‘Share’, ‘disto’); ?> <?php }}?> <?php if(get_theme_mod(‘disable_post_share’) !=1){?> <?php if(function_exists(‘disto_single_share_link’)){ echo disto_single_share_link(get_the_ID()); }?> <?php }?> <?php $prev_post = get_previous_post(); if (!empty($prev_post)){ ?> <?php echo esc_attr($prev_post->post_title); ?> <?php esc_html_e(‘Previous post’, ‘disto’); ?> <?php } ?> <?php $next_post = get_next_post(); if (!empty($next_post)){ ?> <?php echo esc_attr($next_post->post_title); ?> <?php esc_html_e(‘Next post’, ‘disto’); ?> <?php } ?> <?php if(get_theme_mod(‘disable_post_author’) !=1){ if(get_the_author_meta(‘description’)){?> <?php echo get_avatar(get_the_author_meta(‘user_email’), 165); ?> 
    <?php the_author_meta( ‘display_name’ ); ?>
    <?php echo get_the_author_meta(‘description’); ?> 
    <?php }} ?> <?php } ?> <?php } // end of the loop. ?> <?php if(get_theme_mod(‘disable_post_related’) !=1){?> 
    <?php esc_html_e(‘Related Articles’, ‘disto’); ?> 
    <?php $arg_tag = array(‘category__in’ => wp_get_post_categories($post_id), ‘showposts’ => 4, ‘post__not_in’ => array($post_id)); $post_query = null; $post_query = new WP_Query($arg_tag); $post_count = 0; while ($post_query->have_posts()) { $post_query->the_post(); $post_id = get_the_ID(); $categories = get_the_category(get_the_ID()); $post_count ++; ?> <?php if ( has_post_thumbnail()) {?> <?php the_post_thumbnail(‘disto_large_feature_image’);?> <?php if(get_theme_mod(‘disable_post_category’) !=1){ $categories = get_the_category(get_the_ID()); if ($categories) { echo ‘ ’; foreach( $categories as $tag) { $tag_link = get_category_link($tag->term_id); $title_bg_Color = get_term_meta($tag->term_id, “category_color_options”, true); $title_reactions = get_term_meta($tag->term_id, “disto_cat_reactions”, true); if($title_reactions){}else{echo ‘’.$tag->name.’’;} } echo “ ”; } } echo disto_post_type(); ?> <?php }else{}?> 
    <?php the_title()?>
    <?php echo disto_post_meta(get_the_ID()); ?> <?php if($post_count%2==0){echo ‘ ’;}elseif($post_count%3==0){echo ‘ ’;}?> <?php } wp_reset_postdata(); ?> <?php } ?> <!- comment -> <?php comments_template(’’, true); ?> <!- end post -> <?php $full= get_post_custom_values(‘single_post_full_single_post_full’, get_the_ID()); if($full0==true){}else{?> <?php echo disto_post_sidebar();?> <?php }?> 

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.