• Resolved peter1

    (@peter1)


    Hi all, I am using a theme with a post author function displaying. I have set up my profile and added a bio and the post author appears fine at the foot of each post with my bio.

    But when I click the “view all posts by” it goes to a 404 page. I have no idea how to make that go to the right page. I’ve searched post author all through the forum but keep getting threads that are years old and don’t seem to apply.

    Where does the link come from in the “view all posts by” and how do I get it to show my posts?

    https://www.over40cyclist.com/

    Thanks
    Peter

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter peter1

    (@peter1)

    I’ve tried creating another user as admin, thinking that if that worked then I could transfer all posts to that user and delete the current one. But again the author link just sentme to the homepage and the link displayed the username ie
    https://www.over40cyclist.com/author/username/

    I don’t really want to display my username in my link, not very secure.

    Looked all through databases for Over40Cyclist, only found one which was my display name, so changed that to Over 40 Cyclist which worked to change the display name but didn’t change the author link. No other entries for Over40Cyclist in the database other than in the normal urls as that is the url.

    Thread Starter peter1

    (@peter1)

    Should have been clearer, the change I made in the database was to the “nicename” in the users table, and it now shows Pver 40 Cyclist ie with spaces, but no change to the author link.

    There is a “user url” field there but it’s blank.

    So it was the nicename? OK good to know. Spaces can actually cause the same issue so I’m not sure that’s the best solution. User URL is not related to this.

    You’re right about it not being a good idea to display your username publicly for an admin account – but best practices are actually to post only from an account with the ‘author’ role (not ‘admin’). You could have 2 users, 1 admin, 1 author. Since it’s way more convenient to post as an admin through the WP dashboard, just do so as the admin user, and then switch the post author field at the bottom of the post to the user with the author role when you publish your posts.

    Back to the author archive thing. If you edit a post now, what does it say in the Author dropdown field? Can you change it to your current user, save, and then try to view the author link for that user?

    Thread Starter peter1

    (@peter1)

    Sorry Essaysnark, I think you misunderstood. Maybe I explained it wrong.

    Changing the nicename made no difference. (no change to the author link).

    No I don’t have an author file, I did look for that yesterday. So I gave that a try, downloaded and uploaded the author.php to my current theme, but it still redirects to the home page.

    If you changed the nicename in the DB to a value that has spaces in it, it could cause the same problem. If you made that change then you may want to change it back (or change to over-40-cyclist instead).

    But guess what? I think I know what this is – and it’s so darned simple you’re gonna laugh (I hope!).

    It’s from your Yoast SEO plugin. Look for the option that disables the author archives for single-author sites. Turn that off. See if you can at least get to https://www.over40cyclist.com/?author=2

    Thread Starter peter1

    (@peter1)

    IT WORKS, Essaysnark you’re a genius. I would never have found that in a thousand years. Never even occurred to me to look there. And strangely with all plugins turned off, including yoast, it didn’t work either!

    I now have an author page!

    There’s the value of this forum and having contributers like you who know so much more than me. So much appreciated.

    All the best to you and thanks again!

    You actually had 2 problems going on. The reason it didn’t work with all plugins deactivated is something to do with that nicename in the DB. The reason your other author archive was redirecting to home was due to this. The combination was indeed tough to diagnose! Glad you got it working.

    Thread Starter peter1

    (@peter1)

    You got it working, not me. I just took your advice. Yes very happy that it works now, it was driving me nuts trying to work this out, so again, much appreciated, thanks.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Can someone explain post author please’ is closed to new replies.