Creating a button from data from Author meta

You just created an empty link, it has correct link but no inner text: echo ‘<a href=”‘ . esc_url( the_author_meta(‘snapchat_profile’)) . ‘”>Follow on Snapchat</a>’; And since you already stored the link in $snapchat_profile variable, no need to call the the_author_meta(‘snapchat_profile’) function once again (it will only reduce in a few bits of extra memory usage … Read more

Open the_author_link() in a new window

Yes, you have to get the url by user’s meta: <?php if ( get_the_author_meta(‘url’) ) { // Author has website url $author_url = get_the_author_meta(‘url’); } else { // Author doesn’t have website url, so get Author Posts Page $author_url = get_author_posts_url( get_the_author_meta(‘ID’) ); } ?> <a href=”https://wordpress.stackexchange.com/questions/273597/<?php echo $author_url; ?>” target=”_blank”>Author’s website</a>

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.

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

Display Random Post in Author Page

use this query in themes functions.php function ng_author_query( $query ) { if ( $query->is_author() && $query->is_main_query() ) { // your code to set $current_user_name here $query->set( ‘orderby’, ‘rand’ ); } } add_action( ‘pre_get_posts’, ‘ng_author_query’ ); Let me know if you have any problem?

How to add author on WordPress Pages? Not blog article page

WordPress has a function which does this for you. You’ll need some experiences with HTML, CSS, PHP to style the output and understand what that function does: the_author() which displays the author of the post/page. In your theme will most likely be a page.php template where you can add these on pages into The Loop … Read more

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