Tag Info

Hot answers tagged

2

get_the_author() takes no arguments and must be used within the Loop (I guess it's the case). /* get_the_author($spost->ID); Replace this. */ get_the_author(); // By this.


2

Sebastien's answer got me on the right track. I should not be using the_author, because I am not looking for the author of a post (My query is not returning a post, but a user), rather the name of the user. I changed: echo get_the_author($spost->ID); to echo $spost->display_name;


1

The capability you are after is called "unfiltered_html". Some options: Modify author capabilities in your theme functions.php. This is saved in the DB, so you can access a page, make sure it works then remove it from your functions.php file. A better option would be to run it on theme activation. See this page on WP Codex for options: ...


1

This is a bad idea and you might as well just give those users "higher" roles as with the "unfiltered_html" permission it is not very hard to duplicate the admin authorization cookies and take control of the site. What you should do is to teach them to use the built-in functionality of oEmbed, which should be enough to embed content from many sites in a ...


1

You can override the author link via the author_link filter: function wpd_author_link( $link, $author_id, $author_nicename ){ return 'http://my.blog.tld/'; } add_filter( 'author_link', 'wpd_author_link', 20, 3 ); $author_id and $author_nicename are available to the filter so you can fetch whatever data you need to generate the correct link.



Only top voted, non community-wiki answers of a minimum length are eligible