Sure. In you’re seeing author info right now, then in your index.php template you’ll probably see a line like this:
<small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small>
If you want to remove the author info, just edit that part of the line so that it reads:
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
The “<!–” and “–>” are comment symbols that take the enclosed bit of code out of play. Alternatively, you could just erase that bit so that it looks like:
<small><?php the_time('F jS, Y') ?></small>
No, there is no “selective” way to remove the author information. If you remove it for one, you remove it for all, I believe.
I don’t want to remove the “posted by author” comment on every post, just on a select few. Is that possible? Thanks.
Only if you can find some common element between the posts you want to remove it from that is distinctive from those you don’t. As in, “all posts in ‘anonymous’ category.”
I suppose you could use David Chait’s QuickPHP and insert the author within the post itself.
This is possible .. It can easily be done by hacking the core or you could create a plugin that hijacks the_author() and only outputs for certain people. I’ve got an example of this as a plugin at http://code.jalenack.com , except for comment names instead of author names. If you can’t take it from there or don’t know much about php, post back and I could mockup a plugin.
Right, “some common element between posts…” will allow you do to what you want. In jalenack’s case it is by author. What specifically do you want to select on?
First off, thanks for all the replies!
I’m trying to make it so that on “pages” there is no author byline while on “posts” there are. How would I go about doing this?
Regarding jalenack’s post, unfortunately I’m still kind of new at WordPress and don’t have the requiste php knowledge to make a plugin.
Use the example from Pages http://codex.wordpress.org/Pages on how to make a custom template file and in that template file, remove the author tag as described above.
Make sure you choose that template in your Manage >Pages specific Pages where you want to do this, and you are done.
Uh, I think using a page.php would be easiest.
Make a copy of the single.php (if your theme does not have one, use index.php), name it page.php (or, you may already have one), and edit out the_author() from that. WordPress will use page.php for Pages automatically.
I do that. Just create a user with no first or last name. I have a user nicknamed “anon” who gets all the pages or posts that I want to appear with no byline.
Then pick that user to be author.
You want to be sure that the_author() in your templates won’t show a nickname. I do that in my templates by showing the byline as:
- The topic ‘Turn off author name’ is closed to new replies.