Changing url of author page

I have author page on my website: https://inwestujfinanse.pl/author/admin/ when I try to change it normally in https://inwestujfinanse.pl/wp-admin/profile.php nothing happens. Is there any way I can change it in the database or something? I don't want to install any additional plugin. Please help me.
Category: Web

Display if author page is author page of current user

in my multi author website I have a button that users can upload their avatars. I need to display this button in author page. I can do it. I added this button to author page. The problem is that author can see this button in other author's page too . That's why I need to display this button in author page of current user. I am so sorry I have no any reference code. I have no any idea how …
Category: Web

How to change the post author when the post is published?

I wanted to change the author when a post change from draft to publish. I have $_GET['auth_id'] variable in post edit screen like this ...wp-admin/post.php?post=53&action=edit&auth_id=5. I tried save_post hook to change the post author like below function change_pos_auth($post_id){ if ( ! wp_is_post_revision( $post_id ) ){ // unhook this function so it doesn't loop infinitely remove_action('save_post','change_pos_auth'); if ( isset($_GET['auth_id']) ) { $args = array('ID'=>$post_id,'post_author'=>$_GET['auth_id']); // update the post, which calls save_post again wp_update_post( $args ); } // re-hook this function add_action('save_post','change_pos_auth'); …
Category: Web

Showing the authors username and bio on custom author.php

I have this code I'm using to create a custom author.php, which is working great to show that users posts and it's children etc: <?php get_header(); ?> <?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?> <div class="auth-name"> <?php if ( '' != get_the_author_meta( 'user_description' ) ) echo apply_filters( 'archive_meta', get_the_author_meta( 'display_name' )); ? > </div> <div class="auth-desc"> <?php if ( '' != get_the_author_meta( 'user_description' ) ) echo apply_filters( 'archive_meta', get_the_author_meta( 'user_description' )); ?> </div> <div class="header"> <h1>Buckets made …
Category: Web

WP rest api returns 404 only when author param is used

I have a multisite wordpress installation on aws linux, working perfectly fine. The WP Rest api is also working exactly as it should. Except for one single case. /wp-json/wp/v2/posts?author=<some int> For everything else, including my custom endpoints, and custom params/fields added to the api, it works perfectly. But the moment i add the author part, it returns 404 on all sites. eg: /wp-json/wp/v2/posts?author_exclude=1 //this works /wp-json/wp/v2/posts?page=2 // this also works /wp-json/wp/v2/posts?page=2&author=abc // this also works and returns invalid author /wp-json/wp/v2/posts?page=2&author=1 …
Category: Web

Get all comments of author's posts

Hello I have multi author website. I want to display all comments of posts created by author in author page. Please help me. I found this code but fatal error <?php $args = array( 'author' => AUTHOR_ID, 'posts_per_page' => 500, //Don't use -1 here ); $the_query = new WP_Query( $args ); if($the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : ?> <?php $nested_args = array( 'post_id' => get_the_ID() ); $comments_query = new WP_Comment_Query; $comments = $comments_query->query( $nested_args ); if …
Category: Web

Filter post by current 2 differents users id

I'm filtering my custom post type based on author. I want all users to be able to: 1 - in the list everyone can see the posts created by the admin. 2 - users can also see their own posts in the list, but not those of other users. I can list by admin id only or current user id only, but not both. Code: function list_cpt_by_author_id(){ $user = new WP_User(get_current_user_id()); $authors_id = array( array('author' => "1"), array('author' => "$user"), …
Category: Web

Show Custom Post Type by Author

I would like to set up a function in my functions.php file in a theme so that when a custom-post-type is being viewed, if the user clicks the author name in the post, it only shows CPTs by that author, but on the main blog if they click the author name it will only show the blog posts of that author. I already have the author names showing in my custom post and normal post meta and I have an …
Category: Web

Best way to set up "reviewed by" in Wordpress?

I would like to show both "author" (one or more) and "reviewed by" (just one person) for Wordpress posts and pages on my website. This would be for example a situation where an article is written by a content producer but the information has to be reviewed by an MD or other credentialed medical expert. This type of functionality is in my opinion pretty much a must on YMYL (your money, your life) type websites. My current understanding is that …
Category: Web

Link to Author archive from Navigation Menus in dashboard?

I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have control over who is displayed and in what order they are displayed. Is this doable? I don't think a custom walker would work in this situation as it wouldn't allow for arbitrary order and selection control. So my …
Category: Web

author.php not showing content if Author has no Posts

I am making a custom Genesis theme, and have a custom author.php file that pulls in various custom fields (Using Advanced Custom Fields), and author meta information to the page from the author profile page... It also displays their latest posts. This works perfectly, IF the author has posts assigned to them. If they don't, the page doesn't output any of the content that is normally pulled from the authors profile... I've searched StackExchange, and whilst this has been mentioned …
Category: Web

How to link to the current User/Author Profile page?

Is there a way to link to the authors profile page? At the moment i can access the authors profile by visiting the url like this: http://mysite.com/?author=1 Is there a function that i could use to show this link regardless if the permalinks are changed? Thanks in advanced.
Category: Web

Can multiple authors be assigned on a single custom post?

I have custom post types that I would like to make editable by several users. I created one custom post type using the Toolset plugin. wp_update_post only allows us to set single author: $user_id = array(); $userIds = get_field("agency_to_author",$_POST['post_ID']); // Get Multiple User assing using acf field. foreach ($userIds as $key => $value) { $user_id[] = $value['ID']; } if(!empty($user_id)){ $arg = array( 'ID' => $_POST['post_ID'], 'post_author' => $user_id, ); wp_update_post( $arg ); }
Category: Web

Set a User as Author of all 'New Posts' posted

An Author 'XYZ' is need to be set as the Default author of all New Posts. Irrespective of the actual Author posting the content, the post should be saved by this author 'XYZ'. Is there a Plugin or custom functions, which serves this purpose? Note : The existing posts should stay as it is, no 'change of author' for old posts, only new one should be effected.
Category: Web

co-authors plugin - inline listing

I'm trying to set up co-authors plugin in order to show articles authors function inl_users() { if ( function_exists( 'get_coauthors' ) ) { $coauthors = get_coauthors(); //array_shift($coauthors); foreach ( $coauthors as $coauthor ) { $autArray[] = '<a href=' . get_author_posts_url( $coauthor->ID ) . '>' . $coauthor->display_name . '</a>'; echo implode(", ", $autArray); } } The first author is shown twice in the first element, like this: for $autArray = (John Smith, Joe Blogs); it returns John SmithJohn Smith, Joe Blogs …
Category: Web

Filter Author Link for Numerous Authors for each to go to unique page

I was looking here: Change destination author link But there doesn't seem to be a suggestion on how to work with multiple authors (not co-authors, but each author publishing their own stories. This is the main portion of the Link class in a plugin I'm working on. This simply turns every author link to the same link. The code is fine for a single author blog. Am I not using author_link appropriately? Because adding dump(var) actually lists the author ID …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.