• Hola,
    Quisiera quitar la imagen destacada del resultado de búsqueda, es decir que no aparezca por ningun lado. Aunque no la ponga el tema que uso, mantiene el espacio sin sin la imagen.
    He visto que han resuelto el problema en una anterior consulta, pero no me sirve esa solución.
    En single.php no hay referencia a imágenes, sólo una llamada a contet.php que si contiene información de imágenes.

    Adjunto el código de content.php aquí:

    <?php
    /**
     * The template for displaying all single posts.
     *
     * @package Theme name
     */
    
     global $themen_options;
     $themen_settings = get_option('themen_options',$themen_options);
     if ( is_array( $themen_settings ) && ! empty( $themen_settings )) {
        extract($themen_settings);
    }
    
    get_header(); ?>
    <?php
        $single_post_layout = get_post_meta($post->ID,'themen_page_layout', true);
        $default_post_layout = ($single_post_layout == 'default_layout') ? $default_post_layout : $single_post_layout;
    
        // Dynamically Generating Classes for #primary on the basis of page layout
        $content_class = '';
        switch($default_post_layout){
            case 'left_sidebar':
                $content_class = 'left-sidebar';
                break;
            case 'right_sidebar':
                $content_class = 'right-sidebar';
                break;
            case 'both_sidebar':
                $content_class = 'both-sidebar';
                break;
            case 'no_sidebar_wide':
                $content_class = 'no-sidebar-wide';
                break;
            case 'no_sidebar_narrow':
                $content_class = 'no-sidebar-narraow';
                break;
        }
    ?>
    <?php while ( have_posts() ) : the_post(); ?>
    	<main id="main" class="site-main <?php echo $content_class; ?>" role="main">
            <div class="ap-container">
                <?php if($default_post_layout == 'both_sidebar') : ?>
                    <div id="primary-wrap" class="clearfix">
                <?php endif; ?>
                    <div id="primary" class="content-area">
    
                			<?php get_template_part( 'content', 'single' ); ?>
    
                			<?php the_post_navigation(); ?>
    
                            <?php if($enable_comments_post == 1) : ?>
                			<?php
                				// If comments are open or we have at least one comment, load up the comment template
                				if ( comments_open() || get_comments_number() ) :
                					comments_template();
                				endif;
                			?>
                            <?php endif; ?>
    
                    </div><!-- #primary -->
                    <?php if($default_post_layout == 'left_sidebar' || $default_post_layout == 'both_sidebar') : ?>
                        <?php get_sidebar('left'); ?>
                    <?php endif; ?>
                <?php if($default_post_layout == 'both_sidebar') : ?>
                    </div> <!-- #primary-wrap -->
                <?php endif; ?>
    
                <?php if($default_post_layout == 'right_sidebar' || $default_post_layout == 'both_sidebar') : ?>
                    <?php get_sidebar('right'); ?>
                <?php endif; ?>
            </div><!-- tn-container -->
    	</main><!-- #main -->
    <?php endwhile; // end of the loop. ?>
    <?php get_footer(); ?>

    Gracias por la ayuda que me puedan brindar.

Viendo 1 respuesta (de un total de 1)
  • Iniciador del debate kavi25

    (@kavi25)

    En el anterior mensaje sólo me quedó el codigo de single.php.
    Ahora si adjunto el código de content.php al que hago referencia.
    Agradezco todos los comentarios que me puedan ayudar a resolver esto que seguro será de utilidad para otros.
    Muchas gracias!

    <?php
    /**
     * @package Theme
     */
    ?>
    <?php
        global $apbasic_options;
        $apbasic_settings = get_option('apbasic_options',$apbasic_options);
        $blog_layout = $apbasic_settings['blog_post_display_type'];
        $enable_comments_post = $apbasic_settings['enable_comments_post'];
        $blog_readmore_text = $apbasic_settings['blog_readmore_text'];
    
        switch($blog_layout){
            case 'blog_image_large' :
            case 'blog_full_content' :
                $image_size = 'theme-name-blog-large-thumbnail';
                $no_image = 'no-blog-large-image.png';
                break;
    
            case 'blog_image_medium' :
            case 'blog_image_alternate_medium' :
                $image_size = ' theme-name -blog-medium-thumbnail';
                $no_image = 'no-blog-medium-image.png';
                break;
        }
    
        $blog_img = wp_get_attachment_image_src(get_post_thumbnail_id(),$image_size);
        $blog_img_url = $blog_img[0];
    ?>
    <article id="post-<?php the_ID(); ?>" <?php post_class('category-post-list'); ?>>
    	<header class="entry-header">
    		<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
    
    		<?php /* if ( 'post' == get_post_type() ) : ?>
    		<div class="entry-meta">
    			<?php theme_name _posted_on(); ?>
    		</div><!-- .entry-meta -->
    		<?php endif; */ ?>
    	</header><!-- .entry-header -->
    
        <figure class="blog-feature-image">
            <a href="<?php the_permalink(); ?>">
                <?php if(has_post_thumbnail()) : ?>
                    <img src="<?php echo $blog_img_url; ?>" title="<?php the_title_attribute(); ?>" alt="<?php the_title_attribute(); ?>" />
                <?php else : ?>
                    <img src="<?php echo get_template_directory_uri().'/images/'.$no_image; ?>" title="<?php the_title_attribute(); ?>" alt="<?php the_title_attribute(); ?>" />
                <?php endif; ?>
            </a>
        </figure>
    
    	<div class="entry-content">
            <?php if($blog_layout == 'blog_full_content') : ?>
                <?php the_content(); ?>
            <?php else : ?>
                <?php the_excerpt(); ?>
            <?php endif; ?>
    	</div><!-- .entry-content -->
    
    	<footer class="entry-footer clearfix">
            <span class="entry-footer-wrapper">
                <span class="author user-wrapper"><i class="fa fa-user"></i><a href="<?php ?>"><?php echo get_the_author_meta('display_name'); ?></a></span>
                <span class="posted-date user-wrapper"><i class="fa fa-calendar"></i><a href="<?php ?>"><?php echo the_time('F y, j'); ?></a></span>
                <?php if(has_category()) : ?>
                    <span class="category user-wrapper"><i class="fa fa-folder"></i><?php the_category(', '); ?></span>
                <?php endif; ?>
                <?php if(comments_open() && $enable_comments_post == 1) : ?>
                    <span class="comments user-wrapper"><i class="fa fa-comment"></i><?php comments_popup_link(); ?></span>
                <?php endif; ?>
            </span>
            <?php if($blog_layout != 'blog_full_content') : ?>
                <span class="readmore"><a href="<?php the_permalink(); ?>">
                    <?php if(empty($blog_readmore_text)) : ?>
                        <?php _e('Read More...','accesspress-basic'); ?>
                    <?php else : ?>
                        <?php echo esc_attr($blog_readmore_text); ?>
                    <?php endif; ?>
                </a></span>
            <?php endif; ?>
    		<?php // theme_name _entry_footer(); ?>
    	</footer><!-- .entry-footer -->
    </article><!-- #post-## -->

Viendo 1 respuesta (de un total de 1)

El debate ‘Quitar la imagen destacada del post por completo’ está cerrado a nuevas respuestas.