[Resolved] Author of Post Missing
I am running WP 2.0.2 and K2beta but the problem is theme-independent because if I switch to the default theme the problem still persists.
I have lost public author attribution for posts. In Manage | Posts the right authors are hooked to the right post and the proper attribution appears for each Author in the USER area. On the public face of the blog and when you click on a blog title entry here:
The Author of the post is missing. It was there yesterday.
It was there, in fact, until this morning when I changed several users in batch mode from “Author” to “Contributor” but I did not change my status or the status of others so I don’t know why we all have suddenly lost our public Author attribution.
Any idea what happened and how to fix it?
I have edited no files.
In the default theme’s
index.phpthe author information is commented out so it does not display. For example in
if you change:
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<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.
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:
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.phpto 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:
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.phpwhere it says
...if ($count_users >1)...
...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!
There is this fix suggested by Zeo at:
- The topic ‘[Resolved] Author of Post Missing’ is closed to new replies.