I am facing an issue with my WordPress website. I can see all the links associated to author pages correctly but the link https://humenglish.com/author/ gives 404, which is making troubles in Google Search Console and preventing the stories from ranking. From the code point of view, I have created an author.php file in my theme. Please help me solve this issue. Thanks in advance.
]]>I have a custom taxonomy called “co_writer” which I use to simply tag a post as having been co-written by another author. The “co_writer” terms basically share the same names and slugs with actual authors. For example, John Doe (author) has a “co_writer” term counterpart John Doe.
I need a code that will allow me to also display on an author’s archive posts that have that author’s name used as the term for the “co_writer” taxonomy. So if John Doe has been tagged as co-writer in a post mainly credited to Jane Doe, that post will also show up on John Doe’s author archive. Right now, the posts only appear on the main author’s archive since I lack the code that will grab those into the intended co-author’s page as well.
Is this possible? I was told pre_get_posts might be of use in this case, but I don’t know how exactly I can make it work. Thanks to anyone who can help.
]]>I’ve created a extended user pods with fields and related fields.
In the author.php I’m writting for display the fields:
$nombre_del_autor = get_the_author_meta('nombre');
$nickname = get_the_author_meta('nickname');
echo 'Nombre del autor: ' . esc_html($nombre_del_autor) . '';
echo 'Nick: ' . esc_html($nickname) . '';
What’s the code for the related fields and his fields in the way of use in the templates?
[each coleccion]
<a href="{@permalink}">{@post_title}</a> / Editorial: {@isbn-13_ed} / Idioma Original: {@idioma_ed} / A?o: {@ano_ed} <hr>
[/each]
Thanks
]]>after updating my authors page is not behaving correctly.
https://gametherapy.com.au/author/gametherapist002/
authors page format used to look somewhat like this:
https://gametherapy.com.au/games-on-offer/
i have compared author.php from current supreme directory to previous author.php and the files are exactly the same.
]]>Му code
<?php
get_header();
get_coauthors( $post_id );
$page = get_query_var('paged') ? get_query_var('paged') : 1;
$page_offset = ($page-1) * 8;
$authors = get_queried_object()->ID;
$author_id = wp_list_pluck( get_coauthors( $post_id ), 'ID');
$coauthor_id = join(', ', $author_id);
?>
<?php
$postslist = get_posts( array(
'posts_per_page' => 10,
'offset' => $page_offset,
'author__in' => $authors,
'orderby' => 'date',
'order' => 'DESC',
'post_type' => 'post') );
?>
<?php foreach ($postslist as $post) : setup_postdata($post); ?>
<div class="article_image">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'article_arhive' ); ?></a>
</div>
<?php endforeach; ?>
<?php wp_reset_postdata() ?>
]]>Following are the steps I took to debug the problem:
1. Template file that is used to generate author page with 1 or more than 1 post – author.php
2. Template file that is used to generate author page with no post – Does’t exist
How can I debug the issue further and fix it?
]]>So, I’ve recently noticed a problem.
Two users, one with nice_name ‘-4’ and the other with nice_name ‘4’ in the db.
When you call the query:
$author = get_user_by( ‘slug’, get_query_var( ‘author_name’ ) );
$author = $author->ID;
You only get the the details for the user with nice_name ‘4’. The hyphen is somehow ignored.
I’d appreciate any thoughts.
Thanks.
]]>How can I customize the author page of astra? currently if I click on the author of an article, I land on the main page of the website, I would like to land on my personalized page.
Thanks for the help.
what i want : if anyone opens any author’s page, it will display random posts from that author.
i have searched everywhere but i can not able to find any solution on web! so plz help me.
]]><h1><span><?php echo $curauth->display_name;
if (author_can( $post->ID, 'edit_dashboard' )) {
echo "(".$curauth->user_email.")";
} ?>
</span></h1>
The problem I’ve run into is that it doesn’t output the email address if the user has zero posts. Is there a way to tweak that?
]]>