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

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

How to query posts from specific authors and categories using WP_query?

I currently have a WP_query where I am getting posts from a specific set of authors. To this, I want to add specific categories as well. $args = array( 'author__in' => $authors, 'posts_per_page' => 12, 'paged' => $paged ); $authors is an array containing users' ids. So, I need to query posts from both, authors and categories. I was thinking about using something like this: 'tax_query' => array( 'relation' => 'OR', array( 'taxonomy' => 'category', 'field' => 'id', 'terms' => …
Category: Web

Wordpress doesn't show all posts of a specific author

I'm running a multi-author wordpress. Recently I've changed username of one of my authors (using Easy Username Updater plugin, and verifying it in the database). Now, in the frontend the author page doesn't show all of his posts (only some of them), though all of these posts can be found in the backend. What went wrong?
Category: Web

Users with custom roles not showing in post author select box

I am using a function to create new user roles and delete some defaults. However, they are not showing up in the post author box! Only the admin shows up because they are selected as an admin. Any user with a custom role does not show up. Any idea why this would be happening? Here is my function: // Add New User Roles function add_new_roles() { // New Roles To Be Added $new_roles = array( array( 'role' => 'senior_pastor', 'display' …
Category: Web

How can I control multiple editing of wordpress posts?

I am managing multiple authors blog, I have issues of editors taking over the stories that someone else is currently editing. The default wordpress warning will display but some of them ignore it and still proceed to takeover the story. I need a way of locking such stories to prevent editing unless unlocked by the user who locked them or a user of higher role/capability.
Category: Web

Adding An Author Tag To Posts Automatically

I have been researching how to automatically tag a post by author, so if "Peter Parker" authors a post, that post would automatically show up with a tag "Peter Parker." This is because I will have a multi-author blog with custom post types picked up by various blog rolls, and don't want to leave it up to users to remember to tag themselves in every single post. I came across this thread that seemed to be asking the same thing …
Category: Web

Adding Author Box Meta Links with Co-Authors

I have a site that has multiple authors for a single post, requiring multiple author box bios after the article. I previously used get_the_author_meta() to pull the user's social media hyperlinks as clickable icons beneath the author description, but when using a foreach loop with co-authors only the first author's social media links are used. I've tried changing the arguments $author_id to $coauthor_id, but this does not seem to work. Using get_the_co_author just pulls all the css sprite icons without …
Category: Web

Co Authoring with different positions

Is it possible to assign many authors to a post and specify the contribution type of each one with some labels like: writer, translator, author, reviewer etc. I tried the plugin Co-Authors Plus, but it assumes every user assigned to an article is an author. PS: The contribution type of a user may differ from a post to another one, for example, he may be a translator for post X and writer for post Y. I need to attach a …
Category: Web

how to show Author group not Author name

i own blog which me and some of my friends write posts on it and i allow guests to write there own posts put under evey post we shows Author name i want to add me and all my friends to a group and every post one of us write display ower group name not Author name. how to achieve this.
Category: Web

Multiple Authors on Single Post

Does anyone know how to assign multiple Users as authors of single individual posts (even single custom post types)? I want more than just displaying as tags the list of authors. I am looking at the plugin Groups and do not know if you can set the Author of a post to be a group. Has anyone used this setup before? I need roles and permissions in place where Users of a Group have EDIT capabilities for a single post. …
Category: Web

Multi user site and image captions

On multi user sites when authors select images from the media library they can choose images that other authors have uploaded. The problem is that they can edit the caption and it changes it for both the post they're making and any previous posts that have the same image and caption, this doesn't make any sense. Is there a way to stop authors from user images uploaded by other authors or fixing the image caption problem?
Category: Web

Best approach to allow front-end display of posts’ reviewers?

My first question here; please forgive any protocol lapses. I manage an academic journal that publishes on Wordpress. We use Co-Authors Plus to allow collaborative articles. Each article also has two or more peer reviewers, who currently have entries as “Speakers”, a custom post type created by the theme we use: The Keynote from Goodlayers. I want to attach metadata to each article to identify its reviewers, ultimately to display that information to readers on the front end. (For now, …
Category: Web

How to add an inline word after post author commenter name?

I want to add an inline word(s) after comments of post author's name. Suppose, my name is Tiger and i am the post author, so Post author will be printed after my name every time when i add a comment on the post. I don't want to edit comment.php file. I want custom functions for functions.php
Category: Web

About

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