Change author base slug to user role
I think the plugin: https://wordpress.org/plugins/edit-author-slug/ does exactly what you need.
I think the plugin: https://wordpress.org/plugins/edit-author-slug/ does exactly what you need.
Unless I have misunderstood your question to accomplish a custom gravatar to use in your theme add the code below to your functions.php or into a custom plugin. From there customize the title and the image you want to use. See screenshot below for the finished outcome. add_filter( ‘avatar_defaults’, ‘dev_designs_gravatar’ ); /** * Display a … Read more
I think it might take some time for the google to update this information to the search index. As far i’ve seen the older posts on my blog (multi user) show the author information in a google search. The latest posts don’t really get updated with that information. A post from Feb 2013 Posts from … Read more
Essentially, you can’t do that because you’ve overlapped the “page” and “author” sections in the namespace. See, with your setup, then given a URL like http://example.com/whatever, WordPress has no way to distinguish whether “whatever” is an author or a Page. To do this, you’d need to add a lot more code to add extra querying … Read more
It seems that you have to add the capability yourself. You can get the necessary code for that in How do I create a custom role capability?. You can also use Members Plugin which seems to do that for you(I haven’t used it myself yet). I think this discussion here will also help you to … Read more
Try this, it will change display names to logins anywhere in the Loop: add_filter(‘the_author’, ‘return_login’); function return_login($display_name) { if ( !in_the_loop() ) return $display_name; return get_the_author_meta(‘login’); }
A quick fix would be to use WP’s body class and in your stylesheet target the element containing the autor name to hide it for the page(s) you want. For example : .page-id-227 #my_authors{ display: none } Update : Another solution would be to use conditional tags in your templates, to print the author names … Read more
The first thing you need to approach is a counter. You said “author profile” so I assume that you are talking about WP’s author page, which is an archive template identified by is_author(). And I assumed you are counting the number of visits to the author page – not visits to pages/posts by that author … Read more
you should use it: <?php get_comment( $id, $output ); ?> Return comment_ID (integer) The comment ID comment_post_ID (integer) The post ID of the associated post comment_author (string) The comment author’s name comment_author_email (string) The comment author’s email comment_author_url (string) The comment author’s webpage comment_author_IP (string) The comment author’s IP comment_date (string) The datetime of the … Read more
Putting the following inside loop should fulfill your needs: <?php $get_author_id = get_the_author_meta(‘ID’); $get_author_gravatar = get_avatar_url($get_author_id, array(‘size’ => 450)); if(has_post_thumbnail()){ the_post_thumbnail(); } else { echo ‘<img src=”‘.$get_author_gravatar.'” alt=”‘.get_the_title().'” />’; } ?>