WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts by User (12 posts)

  1. Lasha
    Member
    Posted 8 years ago #

    Hey guys, I've been pulling my hair out over this topic, and I can't seem to find a conclusion. Is there any tag, or parameter within a tag that will allow me to display all posts from a specific user? Permanent Links are enabled, and I know that when you enter /author/nickname, it displays all of that user's posts in an archive.

    Now, that is about 10% helpful, since I would like to have a customized page of my own where I use a tag to insert into the page that will display whichever user's posts I choose to. This would help me out so much since my blog will be based on multiple authors/users.

  2. moshu
    Member
    Posted 8 years ago #

    Did you have a chance to look at this? > Author_Templates and all the other resources referred from there?

  3. Lasha
    Member
    Posted 8 years ago #

    I did look through that page for a long time, and found something that is similar to what I am looking for. What the script there does is generates a page with the author's posts. I want to have complete control over this, so I can do this:

    Create my own HTML/CSS page, and within a certain div tag, have a tag that would retrieve all of the posts from a user. I don't want it to display links to the author's posts, but instead, snippets of the full post just like on the index page where everyone's posts are displayed, and you can choose to view the full entry.

    I know it sounds so simple, but I can't seem to find anything. The reason why I want to do it manually is because the page I want to insert a user's posts in will have other custom stuff loaded FOR that user like their picture, manually entered bio, and etc. That's one thing WordPress doesn't do; load custom data for the author it is displaying posts of. I hope that makes sense.

    If you have questions on what I want to do specificially, or anything else, please ask! I could really use the help. Thanks!

  4. Lasha
    Member
    Posted 8 years ago #

    Will this allow me to do what I am looking for?

    http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/

    Thanks.

  5. moshu
    Member
    Posted 8 years ago #

    Not really. You should read carefully the instructions and description :)
    Actually I had another look at the Codex page I linked above. It seems everything you have listed can be done with the methods proposed there. (Maybe except the photo - but I am sure there is a solution somewhere even for that.)
    And as I said: that page and ALL the resources linked from there. Yes, I know, it's a very long reading, but that's how things work...

  6. Lasha
    Member
    Posted 8 years ago #

    Say I create a page called, funtime.php and placed it within the wordpress installation where template tags and etc. would work if inserted. That is what I want to do. Create a page, and have only one tag on it which displays a single user's posts just like in an archive. Nothing else. Everything else will be coded into the page manually using HTML and CSS.

    If the resources in the page you linked me to will do just that, then I will go back and re-read until my brain has a meltdown from it. Thanks.

  7. moshu
    Member
    Posted 8 years ago #

    Say I create a page called, funtime.php and placed it within the wordpress installation where template tags and etc. would work if inserted
    That's not a page, that's a file. Furthermore, that filename is not part of the WP template files system, so WP does not recognize it. Of course, you can make it "WP aware" but that still might not do what you want.

    Create a page, and have only one tag on it which displays a single user's posts just like in an archive.
    That will never happen: "only one tag".
    For displaying an author's posts (and any data about the author!!!) you need to use the author.php template file with ALL the (zillion) template tags and code for whatever you want to display. Just read again the Codex page I linked above.

    You can code and style the html and css part in any template file as you want. That's what the different templates are for.

  8. Lasha
    Member
    Posted 8 years ago #

    Yea, by page I meant file, and when I said a single tag, I didn't mean literally only and only 1 tag. I know I have to use the author.php template.

    Speaking of making manually created files "WP Aware", how do I do that? Thanks!

  9. moshu
    Member
    Posted 8 years ago #

    Put at the top above everything else:
    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

  10. Lasha
    Member
    Posted 8 years ago #

    And that will allow the template tags to work in the page I put that on top of, right?

  11. moshu
    Member
    Posted 8 years ago #

    Yes, every WP function should work if you have that (with the correct path :).

  12. Lasha
    Member
    Posted 8 years ago #

    That just made my bad. With proper manipulation of the tags, and thought, I should get everything the way I want to, sooner or later, heh. Thanks!

    If I have any more issues, I'll probably post back in this thread since it'll be regarding the same topic. Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic