3

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 (which would make the counter discussed below an ...


2

Try this: function profile_counts($atts) { $atts = shortcode_atts( array( 'metakey' => '', 'metavalue' => '', 'userrole' => '', ), $atts ); $user_ids = get_users( array( 'meta_key' => $atts['metakey'], 'meta_value' => $atts['metavalue'], 'role__in' => wp_parse_list( $...


2

If you use WordPress author template to show user posts ( example.com/author/{user_name} ) the best solution will be to change the main query via the pre_get_posts filter hook. function se339534_author_any_post_types $query ) { // apply changes only for author archive page if ( ! is_author() || ! $query->is_main_query() ) return; $...


1

Unfortunately there's no action hooks on user-edit.php that would allow you to place html before the profile image. One option is to use javascript/jquery to move the html around the profile page. But as @RiddleMeThis mentioned on the comments, you can use user_contactmethods filter to add custom contact methods such as Twitter to the profile page. ...


1

I've written this in a hurry and it's untested and probably sloppy code, but it gives you an idea of how to accomplish this with AJAX. <form id="update_user"> <div class="form-group"> <label for="firstname">Name</label> <input type="text" name="firstname" id="firstname" ...


1

Remove $query parameter from add_rewrite_tag. Your rewrite tag registration will look like this: add_rewrite_tag('%expert%', '([^&]+)');. The phrase in the rewrite rule may be '^expert/([^/]+)/?', but it was not the reason for the problem.


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