WordPress.org

Ready to get started?Download WordPress

Forums

can't figure out author.php (6 posts)

  1. cicek1
    Member
    Posted 6 years ago #

    Hi there, I'm new to blogs and very new to WordPress (2 days). I've managed to get a test site up, changed things in the theme that I wanted to change, arrange things the way I wanted to...in other words, with research and trial and error, I've managed to tackle the things I've wanted to change. However, I have little experience with style sheets, html, etc. so please assume that I am dumb and speak slowly.

    However, after hours of research, I can't figure out author.php. I started out wanting to link from an author's name to some kind of profile page. I gathered that I needed to have an author.php file installed, and then I could insert code in my index file which would link to the profile page. However, I can't find the profile page! My theme didn't have one, so I copied one from a default template. If I'm on the right track (and everything I just wrote might be wrong), then how to I get to the author page, and add info to it?

    Thanks so much!

  2. moshu
    Member
    Posted 6 years ago #

    Everything is there: Author_Templates
    Pay very close attention to Section #3 - Further Reading!!!

  3. cicek1
    Member
    Posted 6 years ago #

    Thank you for your reply. I'm sure that as a moderator you know this stuff inside and out, and I'm guessing it's very frustrating for you to answer questions from someone like me who is rather code challenged. However, I don't give up easily, and I had read all of those pages (plus dozens of pages that they linked to, trying to get explanations for the explanations) before I posted my question. After you post, I went back and tried to read them again. I'm more confused than ever.

    If understanding WP is like a foreign language, I'm at the stage where I can tell someone my name and where I'm from, that's it. So I'm trying to keep things simple. The reason I chose WP is that review after review touted the ease of use. I know that many people do much more involved, difficult things with it as well, but I'm not one of them. I'm trying to set up some simple sites. I've been able to do everything I want thus far - change the way things look, their placement and color, etc. Two days ago I didn't know what a CSS was and now I'm editing them.

    I'm giving you this background to let you know that I tried. I tried to solve this myself. I read everything I could in the documentation and the forums. I downloaded half a dozen different author template codes and tried to figure out what to do with them. I got as far as getting an author template to appear in the template drop down on the page write page, but I get an error if I try to click on a page created with that template.

    I'm not trying to do anything complicated. Linking to an author's info should not be this difficult. My head is spinning with "codex" and "template page" and "php" and hard as I try, I can't figure out how to put it all together in a way that will work. The documentation is very confusing and the forum answers are over my head. A new user should not have to spend 24 hours stuck on this one thing. Please try to look at this from the perspective of someone who is not a "computer person."

    Is WP not for me? I won't be insulted. Or, since I've figured out everything else I needed to do for my sites, can I pay someone to show me, step by step, how to set up this particular aspect? Or is there something out there I'm not finding like cformsII that lays it all out for me without me having to creat pages and write code? I'm completely stuck.

    Sorry for the long post. It's the result of reading reply after reply to other newbies' questions that were insulting and rude (not yours, the ones I had to read to try to figure this out).

  4. moshu
    Member
    Posted 6 years ago #

    The steps you described in your OP (original post) seemed to be correct: you didn't have an author template, so you have created one. Good.
    The Codex gives you an example of the author.php template file (Author Template) for the default theme - since that theme is there in everybody's WP install. If you are using the default theme - that should work.
    If you have a different theme... it might be a bit more difficult but not very much. In this case you have to keep the HTML markup (the div ids and classes) from your own Page template and insert in it the specific code given for displaying author info.

    That much about the theory. Now, if you want to be practical and what to gethelp - instead of long posts you could just paste your author.php file's code into a pastebin like http://wordpress.pastebin.ca and ask for specific help with the code. Otherwise I will send you back again and again to the codex... since I have no idea what the heck is not working for you!
    Also, you should have posted exactly what kind of error you get (better give a link to that Page) - it's much more helpful than ranting about the Codex, the forums etc.

    Just for the record: I am NOT a computer person, I am an old linguist; and English is not even my mother tongue but I can read and follow the instructions in the Codex articles.

  5. cicek1
    Member
    Posted 6 years ago #

    Thank you so much for your reply! I feel bad about the rant. I think it bubbled to the top because I was feeling really frustrated and idiotic. With just about any other subject I can usually parse things out, and I was really angry with myself for not being able to solve this. I think I'm just missing the gene that helps a person "get" code.

    Let me see if I'm understanding you: I'm using for this example family.oztanfamily.com, because I haven't really messed with it yet so I know I haven't changed/ruined anything. The theme I'm using is redie-30.

    So, I should create an empty file called author.php, and into it I should put the code from my page.php file, and the code from sample author.php pages. I've pasted it here: http://wordpress.pastebin.ca/915966

    This template should then show up in the drop-down on the page write page (it is not). I don't have to type anything in, just publish the page. The template will grab information from the WP profile page and display it on the author page. Is that correct?

    Thank you!

  6. moshu
    Member
    Posted 6 years ago #

    You really need to improve your reading skills...
    I did NOT say what you reproduced above. I said "keep the html" markup - not the php code from your page.php template!
    <div id="whatever"> - is HTML
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> - is PHP

    Also, when creating your own Page template...
    Pages#Creating_your_own_Page_Templates - see the examples.

    Anyway, try this:
    http://wordpress.pastebin.ca/915973

Topic Closed

This topic has been closed to new replies.

About this Topic