Forums

[resolved] [closed] author, query, post, hack help (going crazy!) (gone) (6 posts)

  1. instructa
    Member
    Posted 6 months ago #

    I'm using the cover-wp theme and it uses this div to show the 3 newest post to this "featured" category, works great. However, I would like to use it in an Authors.php and pull only the current authors post. I have tried everything and am getting nowhere.
    Any help?
    Thank you much!

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. instructa
    Member
    Posted 6 months ago #

    <h3><?php _e('Featured','cover-wp') ?></h3>
    <?php query_posts("caller_get_posts=1&showposts=3&category_name=".get_option('cover_wp_featured_cat', 'Featured')); $i = 1; ?><?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  3. Marventus
    Member
    Posted 6 months ago #

    Hi,

    WP should already be showing only your author's posts by default when you click on the author's posts link. But if for some reason it's not, try adding an author parameter to your query_posts call, like so:

    <h3><?php _e('Featured','cover-wp') ?></h3>
    <?php
    $author_ID = get_the_author_meta('ID');
    query_posts("caller_get_posts=1&showposts=3&category_name=".get_option('cover_wp_featured_cat', 'Featured').'&author='.$author_ID);
    $i = 1;
    if(have_posts()) : while(have_posts()) : the_post();
    ?>
  4. instructa
    Member
    Posted 6 months ago #

    Thank you for the reply Marventus
    This was solved here

    But agian Thank You!

  5. Marventus
    Member
    Posted 6 months ago #

    I'm glad you figured it out.
    However, I feel obligated to tell you that you should refrain from posting duplicate topics on the forums. Not only is it against the forum rules, but it is also a waste of space, resources, and time.
    Thank you for your understanding.

  6. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 6 months ago #

    Yes, yes it is. Please don't make duplicate posts in the future. We close them when we find them. Like this one.

Topic Closed

This topic has been closed to new replies.

About this Topic