Support » Fixing WordPress » the_author() not working

  • pauarge



    I have a very strange issue in my blog: when I use the function the_author() in the file single.php (in my own template), it doesn’t show the author’s name.

    If I use other metadata like the_tags(), it works. Also, if I use the function in other file (like post-single.php) works.

Viewing 3 replies - 1 through 3 (of 3 total)
  • WPProHelp


    Can you post the code you are trying to use?



    This is my single.php file:

    <?php global $theme; get_header(); ?>
        <div id="main">
            <?php $theme->hook('main_before'); ?>
            <div id="post-header">
            	<div id="post-header-top">
                	<div id="post-title"><?php the_title(); ?></div>
                <div id="post-header-bottom">
                	<div id="post-meta">
                    	<p>Per <strong><?php the_author(); ?></strong> <span class="data-entrada">el dia <?php echo get_the_date(); ?></span></p>
                    <div id="post-class">
                    	<?php the_tags('<ul class="post-tags"><li>','</li><li>','</li></ul>'); the_category(); ?>
            <div id="content">
                <?php $theme->hook('content_before');
                    if (have_posts()) : while (have_posts()) : the_post();
                         * Find the post formatting for the single post (full post view) in the post-single.php file
                        get_template_part('post', 'single');
                    else :
                        get_template_part('post', 'noresults');
                $theme->hook('content_after'); ?>
            <?php get_sidebars();
            $theme->hook('main_after'); ?>
    <?php get_footer(); ?>


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the_author() not working’ is closed to new replies.