Archived topic
Tried remove author php doesn't work
5 replies · Started by Streater on June 23, 2021
Hi, I tried these suggestions I found for removing the author link in articles and it does not seem to be working:
https://generatepress.com/forums/topic/remove-author-link-from-blog-post/
https://generatepress.com/forums/topic/disabling-linking-to-authors-posts/#post-110297
https://gist.github.com/generatepress/67fb28af5c8be3103290
I added the php to my functions.php and nothing happens. Link to my article page below.
Hi there,
that filter only works with the default author links in the post meta - not those added to a Header Element.
Best option would be to replace the Header Element with a Block Element - as Leo advices here:
https://generatepress.com/forums/topic/removing-author-link-not-working/#post-1817959
Yeah I tried messing with that before you gave me this great solution:
https://generatepress.com/forums/topic/hero-featured-image-problems/
I think I want to stay with your original solution unless you think it is possible here.
In DIVI I did use this which does work here too: author-name a {pointer-events: none;}
BUT the problem with this solution is the underlying link does still exist and some that uses their keyboard to tab through can still access the link. I assume that bots going through my site also can find it. My worry is that bots find my Author Page (sub question: is it possible to delete this too? I've been trying to find a way to since I built my DIVI site but no solution found) and use my user ID to try and login to the admin.
UPDATE: I thought I had a good idea... just manually putting in my author name instead of {post_author} and then adding a display rule just for me as an author (and then doing this for additional authors)... but there isn't display rules for individual authors. Anyway for you guys to add this as a feature or for me to code this feature in?
I think i need more coffee.... try this topic
https://docs.generatepress.com/article/generate_page_hero_post_author/
Haha... Perfect! Thank you!
Yep - having one of those moments lol
Glad to be of help