views:

667

answers:

3

I have added author pages to my company blog recently. Although I've no trouble pulling through relevant fields to populate the page - e.g. Author Name, User-profile, etc, I would really like to be able to add a small amount of html to the user-profile. Currently the whole thing is just dumped onto the author profile page - you can view my sample here.

Although we can add anchors, it seems to strip out other html tags. I presume this is some sort of security feature to prevent external users from adding malicious code. However, membership isn't open, and we could really do to be able to add a bit more structure to the text.

A: 

When writing in the editor you can tab between 'visual' and 'HTML' writing mode. Is the HTML mode not working? I tested it using div tags, which worked.

thesmallprint
A: 

I don't think you can have HTML tags in the actual author field (i.e. in the database), but you could easily change their appearance in the template:

<p>This post was written by <strong><?php the_author(); ?></strong></p>

For example, if you wanted the author surrounded by <strong></strong>.

If you wanted to do something like display the first and last name differently, you could use something like this:

<p>This post was written by <?php the_author_firstname(); ?> <strong><?php the_author_lastname(); ?></strong></p>

As for abitrary HTML in the actual author's name, you'll probably have to look for a 'hacky' way to do it.

Philip Morton
+1  A: 

Sorry I know this is responding to an old post, and I don't want this to come across as self promotion, but I think I had exactly the same problem and because I didn't want to hard code my themes I wrote a couple of plugins.

This one to introduce the authour on their archive

http://www.stephenbaugh.com/blog/wordpress-plugins/author-intro-archive/

for example http://www.stephenbaugh.com/blog/author/tui/

and this one to introduce the author on a post

http://www.stephenbaugh.com/blog/wordpress-plugins/author-intro-post/

for an example see the bottom of this post

http://www.stephenbaugh.com/blog/2009/01/future-publishing/

All the best

Stephen

Stephen Baugh
Thanks for suggesting those - I'll check them out and let you know what I think!
Sam Murray-Sutton
My pleasure. I think they are both good plugins, although the SEO can be a little silly. That is it sees items to link that shouldn't. Eg yesterday I saw a post that said ... "can you contact me?" and contact was linked to my contact page. Not completely silly but unnecessary. Good luck.
Stephen Baugh