Hot answers tagged author
You need to add the following code to content-page.php in your theme folder. <?php the_author(); ?>
It shouldn't be any problem. Try this: $arg = array( 'ID' => $post_id, 'post_author' => $user_id, ); wp_update_post( $arg );
You should declare your desired capabilities when you are registering the post type. Justin's article here is a good one for custom post types: http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress When you are registering your custom post type, you can set this to be standard capabilities for posts, eg: 'capability_type' => ...
If you want to exclude ALL pages that doese't have 'collaborator' set as author, then you want to exclude all other pages in the site and include all pages of that author minus, maybe, some hand picked pages of that author, then I think you can use this: add_filter('acf/fields/relationship/query/name=products', 'exclude_id', 10, 3); function exclude_id ( ...
If I have understood correctly you should be able to edit your page template to include the below. I'm not sure on any plugin to do this though. More info: https://codex.wordpress.org/Function_Reference/get_the_author <?php $author = get_the_author(); echo "$author"; ?> ** This is untested
Only top voted, non community-wiki answers of a minimum length are eligible