How can I control multiple editing of wordpress posts?
How can I control multiple editing of wordpress posts?
How can I control multiple editing of wordpress posts?
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
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
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’); }
Check out this tutorial for query variables: http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/. Essentially what you will be adding is a custom query variable with value either A or B to show different content. I.e. /author/username/contentA is actually index.php?author=username&customqueryvar=contentA.
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
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
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
I don’t think you need to get the list of authors in a given category or use a bunch of individual WP_Query‘s, you just need to order posts by author and check to see when the author changes. Two parts to this. One to modify the loop on category pages to order by author. You … Read more
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