Archived topic
Author Page > Nothing Found
15 replies · Started by Py on February 11, 2023
The author page url domainname.com/author/username/ returns Nothing Found.
Should I enable some setting first?
Can the Author page be built with Elements?
I have both GeneratePress Pro and GenerateBlocks Pro
I want the author page to look exactly like this page I have built for blog posts feed: https://passivebook.com/articles/ with an author box on top and the posts filtered for the respective author.
Hi there,
does the author whose archive you're looking for have any Posts Published ?
I don't use posts in WordPress. I only use pages. How do I display the pages published by the author and exclude some pages based on taxonomy?
Try this PHP Snippet:
function author_pages_pre_get_posts( $query ) {
if ( $query->is_author() && $query->is_main_query() ) {
$query->set( 'post_type', array( 'page', 'post' ) );
$query->set( 'category__not_in', array( 20, 30, 40 ) );
}
}
add_action( 'pre_get_posts', 'author_pages_pre_get_posts' );
Change the IDs in the array( 20, 30, 40 ) to match the categories you want to exclude.
Hi David
I added the code you shared in the snippet plugin but the author page still says Nothing Found
Please check this post: https://passivebook.com/blogging/start-a-blog/history/
The author link is here: https://passivebook.com/author/abhishek/ (Also available in the meta below the title)
Have you disabled the author archive link in your SEO plugin?
The author archive link has been redirected to the homepage.
You were right. Thank you
Can I customize my page with Generate Blocks? Basically, I want to make my Author Page look like this: https://passivebook.com/articles/
You can create a new Block Element - Loop Template and set it to your Author Archives:
https://docs.generatepress.com/article/block-element-loop-template/
You can then add whatever content you want, and for the post loop you can use a Query Loop Block, with the option "Inherit Query from Template" selected.
I have added Social Media Links to the Author Profile using the code here: https://wpknifer.com/add-social-media-links-to-the-author-profile/
I want to display it on the author archives page.
I am using Buttons with Author Meta as shown below:
[img]https://i.imgur.com/cs7JaY1.png[/img]
How do I ensure the button is not displayed if there is no link in the author bio?
Also how do I make the image rounded? I am using Dynamic Image from GenerateBlocks
Here is how it looks now:
[img]https://i.imgur.com/dTvVU6E.png[/img]
Here is how I want it to look
[img]https://i.imgur.com/Oa2I8Bk.png[/img]
Hey David,
How coukd this snippet be altered in the array line to exclude all, or is it a must to list individually?
Hi Py,
if there is no link in the custom field then the button should automatically be removed.
for your second issue, select the Image Block, an increase its Spacing > Border radius to a much larger value on all sides.
Hi Scott,
could raise a new topic?
Hi David,
I don't see the spacing border option in the Dynamic Image option
Please see screenshot below:
https://www.screencast.com/t/RljTRwkg5DIp
Change that Block for a GenerateBlocks Image Block, there you have the GB Spacing Settings and its own Dynamic Data options
I have done this change but the image still doesnt get rounded.
Here is the setting: https://www.screencast.com/t/x4P0Mwjy0g
Here is out it looks: https://passivebook.com/author/abhishek/
Hi Py,
Did you add this code?:
img {
height: auto;
max-width: 100%;
border-radius: 8px!important;
}
It's overriding the border-radius setting you have.
Try removing it from Appearance > Customize > Additional CSS.