Different permalink for posts and authors

I would just change the author_base on the global $wp_rewrite object. Also add a field to the Permalink options page, so you can change it at will. To start: a class to wrap everything up. <?php class Custom_Author_Base { const SETTING = ‘author_base’; private static $ins = null; public static function instance() { is_null(self::$ins) && … Read more

Force display name as full name

This is set during user registration. You can change the value per filter ‘user_register’. Sample code, not tested: /* Plugin Name: First name plus last name as default display name. */ add_action( ‘user_register’, ‘wpse_67444_first_last_display_name’ ); function wpse_67444_first_last_display_name( $user_id ) { $data = get_userdata( $user_id ); // check if these data are available in your real … Read more

Give Author users the right to embed

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 … Read more

show author image in posts

I know this is old, but I just came across it shortly before I came across the solution. To display the author image inside the loop, just use this code: <?php echo get_avatar( get_the_author_meta( ‘ID’ ) , 32 ); ?> Where ’32’ is the size of the image. If it’s outside the loop, then just … Read more

Display edit link if post author is current user

If you just have to modify the author.php page, this piece of code will probably work : <?php if( is_user_logged_in() && is_author(get_current_user_id()) ) { edit_post_link(‘edit’, ”, ”); } ?> The first part of the conditions checks if there is a user logged. The second one will be true if the current page is the author … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)