Display only custom post type count for current author on the “At a Glance” dashboard widget

I think what you’re after is: // The user is logged, retrieve the user id (this needs to go above your foreach) $user_ID = get_current_user_id(); // Now we have got the user’s id, we can pass it to the foreach of your function(this needs to go into your foreach: echo ‘<li>Number of ‘.$post_type->name.’ posts published … Read more

How to control template resolution if both Author and Category filter in place?

You could change the template loaded by hooking onto template_include, checking if is_author and is_category are both set, then switch the template for inclusion to the author template instead. Give this a shot.. add_filter( ‘template_include’, ‘my_template_setter’ ); function my_template_setter( $template ) { if( is_author() && is_category() && is_archive() ) $template = get_author_template(); return $template; } … Read more

wp_title() handling of author page

I see my name in the title when viewing author pages. wp_title() runs this code during execution.. // If there’s an author if ( is_author() ) { $author = get_queried_object(); $title = $author->display_name; } Perhaps your author(s) don’t have a display name set? Additionally be sure to try disabling plugins that may be hooking a … Read more

Adding more pages to author pages

The author rewrite rules are filtered through author_rewrite_rules. You can add a rule there for the pattern author/([^/]+)/edit/?$, but the substitution will depend on how you want to create the edit page. A simple example that will set a custom query variable and load a specific template if this variable is set: add_action( ‘author_rewrite_rules’, ‘wpse18547_author_rewrite_rules’ … Read more

How To Remove The Author(s) From Certain Posts

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

wordpress plugin that show my reputation (points) in any stackexchange project in my wordpress blogs

I don’t know of a plugin but the easiest way is to just embed your stack flair: https://stackoverflow.com/users/flair For a more detialed solution I recommend you just fetch the Stack API using the the WordPress HTTP API, the docs are here: http://codex.wordpress.org/HTTP_API The Stack API is very easy to work with and returns JSON. For … Read more

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