• Resolved eddyferns

    (@eddyferns)


    Hi,

    Usernames are revealed in the Post’s and Page’s source code as below:

    <div class="posted-by"><span class="posted-on">Published <time class="entry-date published updated" datetime="2021-03-09T19:58:21+00:00">March 9, 2021</time></span><span class="byline">By <a href="https://www.site1.com/author/john/" rel="author">harry</a></span></div>

    ‘john’ is the database user_nicename, and ‘harry’ is the public display name of the WordPress user login ID.

    How can we hide usernames for all current and future posts and pages in the source code?

    Regards,
    Ed

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter eddyferns

    (@eddyferns)

    Hi,

    Thanks for your suggestion.

    I need to do it manually as I would be leaving the rest of the theme’s functionality as is.

    Ed

    twenty_twenty_one_posted_by() function is in /inc/template-tags.php

    That’s where you’ll find the code that is injecting the author meta.

    Although editing the parent theme is not recommended!

    Hope that helps.

    Oliver

    Thread Starter eddyferns

    (@eddyferns)

    Thank you for providing the location.

    I always use a child theme. So probably there would be no issue here.

    Ed

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Usernames revealed in Post’s and Page’s source code’ is closed to new replies.