Thread Starter
carlla
(@carlla)
I read about query overview and custom queries. I am not sure if it is useful to me because I am trying to use the custom permalink structure %postname% (admin panel > permalinks) as usually, but I have to give priority to redirect to author page. I can’t use %author% in admin permalink settings, can I? It is not working now.
Is there any other way?
I’m not sure what you want exactly.
– You can reach posts from author via the permalink structure.
– You can use author templates
– Check the function reference ( maybe checking for user exists? )
Thread Starter
carlla
(@carlla)
thank you for reply =)
I need to show a kind of public profile page.
I am going to use author.php and the author functions, as you said. But I don’t know how to change my permalink structure to work like it:
http://www.blog.com/test
1 – ‘test’ is a author name, then get author.php and show the profile
2 – ‘test’ isn’t a author name, ‘test’ is a post slug, then get the single.php and show the post
3 – ‘test’ is neither one, get a 404 page
Thread Starter
carlla
(@carlla)
ok…
I went to admin > permalinks and I try to use custom structure /%author%/%postname%/ ( with 3 ‘/’ )
It works to get the profile page. When I go to http://www.blog.com/test I get the profile page of author named ‘test’. But, to get the posts, my permalinks are http://www.myblog.com/test/post-name
I am starting to think we can’t change the structure to get only top level permalinks =/ not in a safe and easy way.
You can use the template tags to get all posts from ‘test’ author within the profile page maybe ( not sure if you are looking for that !)
But if you want to mix names I don’t think that will be very smart. For instance what happens when an author makes a post with the same name as another author? That’s bad structuring ( and with that comes bad sites ).
Maybe have a main page -> list all authors -> author.php with profile and author posts underneath?
Just a thought..
Thread Starter
carlla
(@carlla)
Maybe have a main page -> list all authors -> author.php with profile and author posts underneath?
Yes, my index.php is working like that
what happens when an author makes a post with the same name as another author? That’s bad structuring ( and with that comes bad sites ).
I can use a filter when update posts and change the slug to prevent that, but if it happens then the permalink will show the author page – default.
My blog will give special atention to the authors, then the permalink will be very important.
but ok, you convinced me.. I will leave it /author-name/post-name
thank you very much for your help =)