form, locate_template, template and permalink
-
I have a form
<form action="/index.php ?>" method="get">
I get/?name=joe&sn=doe&…
I can do
function page_template( $template ) { if ( isset($_GET['name']) ) { $new_template = locate_template( array( 'mytemplate.php' ) ); if ( '' != $new_template ) { return $new_template ; } } return $template; } add_filter( 'template_include', 'page_template', 999 );
Before this it’s OK.
I can do an url rewriting with .htaccess to get
/name/joe/sn/doe
but with rewriting it’s return a 404 page.
- The topic ‘form, locate_template, template and permalink’ is closed to new replies.