Thread Starter
mezzr
(@mezzr)
Michael,
Thanks for the reply.
Ultimately what I’m trying to do is embed the_author_url
within the_author_description
.
As far as I understand it, that’s not possible at present because the_author_description
doesn’t accept any parameters.
In other words what I’m hoping for is a plugin that would let you put a URL within the_author_description
.
Taking the example from Template_Tags/the_author_url couldn’t you just use something like:
<a href="<?php the_author_url(); ?>"><?php the_author_description(); ?></a>
Thread Starter
mezzr
(@mezzr)
Michael,
Thanks again for the help … I thought of trying your example, but the problem is twofold:
1. it makes the entire description a link (looks weird)
2. it doesn’t allow for two separate links.
I’m editing a web publication, and what I’d love to be able to do is enter a description like this:
John Smith is the author of the novel, Smith’s Novel, and a collection of essays, Smith’s Essays.
Do you know of anything that could do that?
Thanks again for your help!
Add this to your theme’s functions.php file:
remove_filter('pre_user_description', 'wp_filter_kses');
Then you should be able to enter normal HTML into the description field. I think.
Note that if this is a multi-user blog, then this is a potential security risk. After you’ve saved the HTML and edited the author to your satisfaction, then you can remove this line and the HTML will remain there, but will then get zapped if anybody tries to edit the user again.
But if you trust your users, it’s not a big deal.
Thread Starter
mezzr
(@mezzr)
Otto,
Thanks for your help. I actually haven’t been using a theme with a function.php file, so I uploaded a function.php which consists solely of this:
<?php
remove_filter('pre_user_description', 'wp_filter_kses');
?>
Unfortunately that doesn’t seem to work though.
Do I have to insert any code somewhere else in order to call the function.php file?
Thanks again for your help, I really appreciate it.
functions.php. The “S” is important. And it must be in your current theme’s directory.
Thread Starter
mezzr
(@mezzr)
Doh. Unfortunately though that was just a typo in my post. The file in my theme is functions.php.
Thanks again for your help though.