Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134402

cold_ on "additional .htaccess rules based on wp page"

$
0
0

I've created a page in the dashboard called Authors, created a new template-authors.php with completely own logic. It works well, going to website.com/authors/ I see a list of all authors, specifying the URL I can get to their details, for instance: website.com/authors/?name=George.
I can also switch profile pictures: website.com/authors/?name=George&pic=1, website.com/authors/?name=George&pic=2 etc (default is 1).

I'm trying for half a day get user-friendly URLs been working but can't figure out a correct way... I'd like to achieve this kind of links: website.com/authors/George and website.com/authors/George/2 . Thank you.

Tried even a really basic code in the functions.php, but it doesn't work add_rewrite_rule('^qwerty', 'index.php/authors/', 'top');
(website.com/qwerty displays 404)...


Viewing all articles
Browse latest Browse all 134402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>