Reputation: 25
For a Wordpress organization website, I want all the posts to have by default the same author name (the organization name). How can I achieve this behavior?
Upvotes: 1
Views: 599
Reputation: 2286
Your best best is to modify your theme or child theme to display a specific user or name wherever the template does so. In your single.php
file, look for the_author()
or get_the_author()
. Then use something like get_user_by()
to pull a specific user, or else hard code the value (less ideal, but an option).
Your other option is to manually set it each time, which I could exactly define as making anything "default." Even so, the option exists.
Upvotes: 1
Reputation: 19396
There are multiple possibilites.
1) Simplest: You only create one author and share the login within the organization
2) You simply do not display the author on your post - why would you do that? It is probably obvious that your organization is the publisher of these pages anyway.
3) Add the following custom code within your Theme or Plugin:
add_filter('the_author','its_my_company');
function its_my_company() {
return 'Organization Name';
}
https://developer.wordpress.org/reference/hooks/the_author/
Upvotes: 3