Support » Fixing WordPress » author meta tag in header

  • The code below doesn’t work with the header.php but it show in other place eg. the sidebar.
    <?php the_author_meta(‘headerads’); ?>

    Can anyone tell me the reason why and show me the way. I am starting a collaborative blog. I will to show user specified ads in the header from their profile page.

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


    Forum Moderator

    You need to specify a user id outside of the Loop.

    Dear esmi
    specifying a user id for each users will be a tiresome jobs to do. It means I have to create custom headers for each users. Suppose if I have 1000s users!!!??

    I think WordPress is missing on this.



    Forum Moderator

    ‘there are no problems unless you create them youself’

    assuming that this only makes sense on single post display,
    you could simply make a loop if there is no – try and use this where you had your line:

    <?php if(is_single()) :
    while ( have_posts() ) : the_post(); 
    endwhile; wp_reset_query();
    endif;   ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘author meta tag in header’ is closed to new replies.