In the default theme’s index.php
the author information is commented out so it does not display. For example in wp-content/themes/default/index.php
if you change:
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
to
<small><?php the_time('F jS, Y') ?> by <?php the_author() ?> </small>
it will print the author name–maybe you can find that in your K2 theme.
Other resources:
K2 forums http://binarybonsai.com/forums/
K2 forums http://getk2.com/forum/
K2 bug report http://getk2.com/bugs/login_page.php
Hi Michael —
That sort of works for the Default page though it doesn’t then list the Author when you click to view the post page with comments and the Author’s name isn’t hotlinked to their homepage. I’m sure all that used to be enabled by default in my setup with K2 and the other themes. I touched no code or pages, but I still lost this functionality. The only thing I changed was the User attribute for about four people from “Author” to “Contributor.”
I used to be able to click on the Author name and then be taken to the Author’s page:
http://urbansemiotic.com/author/boles/
http://urbansemiotic.com/author/chris/
http://urbansemiotic.com/author/mik/
You can’t get to those pages now unless you know the URL because the name with the link is missing.
Seems your problem has to do with changing your users to Contributers–change them back to Author and see if that fixes it.
Otherwise you’ll need to change the code in your theloop.php
to not do the checking it does around line 74 in that file.
Just making sure this is linked with the K2 Forum and the question asked there:
http://getk2.com/forum/showthread.php?t=682&highlight=author
Michael —
I took your advice to switch all the users I moved from “Author” to “Contributor” back to “Author” and it worked!
But why did it work?
What difference does it make to K2 if I change user status? Is it a write/edit permission issue or an post-publish edits issue?
I checked around line 74 in the loop but didn’t get much out of it — if you have a specific line I should be looking at or messing with, please let me know.
How will this work in the future?
Users are required to register on my blog to comment. So the default user status is “subscriber” for new registrations and then I later move them up to “Contributor” or “Author” status if they want to write for the blog. I don’t think I’ve had any trouble with changing a status before today, but today is the first time I took away rights instead of adding them.
I know there are Plugins out there to deeply manipulate roles and permissions but I don’t have them installed so that isn’t part of it.
Thanks for the link to my question over in the GetK2 forum.
I know if you delete a user you lose their posts but you can get around that by editing the user first, changing email information, saving, and then deleting them and your blog loses nothing.
I wonder if I had gone in and changed the email addresses for the Authors, saved them, moved them down to Contributor, then gone in and reinstated their email address — if that might have been a wonky backdoor workaround that would have worked or not?
The theme (Using k2betawor167) will display the post authors only if there is more than one user (even if they have written no posts) with a Role of Author/Editor/Administrator.
If you need to override that behavior, change line 74 in theloop.php
where it says
...if ($count_users >1)...
to
...if ($count_users >0)...
Very cool! I was able to make them Contributors again with your method by creating another Author account I control.
THANK YOU SO MUCH FOR THE HELP!