WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Author of Post Missing (10 posts)

  1. davidboles
    Member
    Posted 8 years ago #

    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:

    http://urbansemiotic.com

    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.

    Thanks!

    db

  2. MichaelH
    Member
    Posted 8 years ago #

    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

  3. davidboles
    Member
    Posted 8 years ago #

    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."

  4. davidboles
    Member
    Posted 8 years ago #

    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.

  5. MichaelH
    Member
    Posted 8 years ago #

    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

  6. davidboles
    Member
    Posted 8 years ago #

    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.

  7. davidboles
    Member
    Posted 8 years ago #

    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?

  8. MichaelH
    Member
    Posted 8 years ago #

    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)...

  9. davidboles
    Member
    Posted 8 years ago #

    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!

  10. MichaelH
    Member
    Posted 8 years ago #

    There is this fix suggested by Zeo at:
    http://getk2.com/forum/showpost.php?p=4004&postcount=7

Topic Closed

This topic has been closed to new replies.

About this Topic