• Hi,

    My template doesn’t recognize “get_header();” inside the single.php page.
    if I remove”get_header”, single.php page work , if i insert them the single.php page get empty.

    here is my code

    <?php if ( have_posts() ) : ?>
    
        <?php get_header(); ?>
    
        <?php while ( have_posts() ) : the_post(); ?>
    
            <div <?php post_class('post clear'); ?> id="post_<?php the_ID(); ?>">
                <?php if ( has_post_thumbnail() ) :?>
                <a href="<?php the_permalink() ?>" class="thumb"><?php the_post_thumbnail('thumbnail', array(
                            'alt'   => trim(strip_tags( $post->post_title )),
                            'title' => trim(strip_tags( $post->post_title )),
                        )); ?></a>
                <?php endif; ?>
    
                <div class="post-category"><?php the_category(' / '); ?></div>
                <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    
                <div class="post-meta">par <span class="post-author"><a
                        href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>" title="Posts by <?php the_author(); ?>"><?php the_author(); ?></a></span>
                                       le <span
                            class="post-date"><?php the_time(__('j M Y')) ?></span> <em>&bull; </em><?php comments_popup_link(__('Pas de commentaire'), __('1 Commentaire'), __('% Commentaires'), '', __('Commentaires ferm&eacute;s')); ?>
                </div>
    
            </div>
    		<?php get_footer(); ?>
        <?php endwhile; ?>
    
        </div>
    
    <?php endif; ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Get_header not recognize by single.php’ is closed to new replies.