How to make a parent page for author.php?

You can add this pages with new rewrite rules like that : add_action(“init”, function () { add_rewrite_tag(“%specialAuthor%”, “([^&]+)”); foreach ([“personalinformation”, “settings”] as $specialAuthor) { add_rewrite_rule( “author/([^/]+)/($specialAuthor)/?$” , “index.php?author_name=\$matches[1]&specialAuthor=\$matches[2]” , “top” ); } }); add_filter(“author_template_hierarchy”, function ($templates) { $specialAuthor = get_query_var(“specialAuthor”, NULL); if (isset($specialAuthor)) { $author = get_queried_object(); $templates = [ “$specialAuthor-{$author->user_nicename}.php”, “$specialAuthor-{$author->ID}.php”, “$specialAuthor.php”, ]; } … Read more

Co Authoring with different positions

I found a correct answer. I ended by adding custom fields (translators, reviewers …) with the ACF plugin. Example: Field Label: Translators Field Name: translators Field type: Relational (user) Field Type: multi-select .. However, this will make the table wp_postmeta very huge, as my website will contain a large number of posts.

Set post featured image to author image

If you use the save_post hook, every time content is published or updated, the featured image will be refreshed. Note: make sure ACF is set to return an image ID, which is not its default. add_action( ‘save_post’, ‘wpse_set_featured_image’ ); function wpse_set_featured_image($post_id) { // get author id $author_id = get_the_author_id($post_id); // get author’s image $author_image_id = … Read more

query all posts published by certain user id

You are querying for post author with ID 8 and also you are telling to match the post type to property post type and also post_status to be either publish, acf-disabled, private. Check your post that didn’t be return for the above and will found the reason. SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND … Read more

get_author_posts_url() Not working

get_the_author_meta() get_author_posts_url() get_avatar_url() You are using all three of these functions incorrectly. Please always check the documentation first. get_the_author_meta() does not require any arguments, but you can supply the field you wish to be returned. get_author_posts_url() requires the user_id. get_author_posts_url() and this one is a bit more flexible and will take a user_id or various … Read more

How to manage the links of a new taxonomy

I see two ways to do this: Automatically: by Matching AUTOR term name to TEAM post title Assuming the autor’s terms are the same as the custom post type team post titles, you could find the relation with code like: function show_product_autor(){ // get this woo-comm’s product author $authors = wp_get_post_terms( get_the_ID() , ‘autor’ ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)