0

I have a wordpress site with a theme.

I now need a custom page, where the user goes to confirm his email address. In other words, when he signs up, he gets an email, which links him to:

MySite.com/confirm

I have this much set up and working, by creating a custom page template, then creating a page based on it with the slug "confirm"

But now I need to get the parameters which are being passed to the page. In other words, the full link is:

MySite.com/confirm.php?key=5

The problem with this is that it breaks the url in that Wordpress is expecting "confirm" not "confirm.php?key=5" so it just gives a 404 error.

The alternative is to put a custom page at the root to process it, but then it loses the theme.

Greg

4

1 に答える 1

0

のみconfirm/?key=5、拡張子なしはどうですか?(パーマリンクが嘘をついていると仮定して%postname%

それぞれ、mysite.com/? のようなことができます。p=%post_id%&key=5 の場合、クエリ パラメータを保持したまま、パーマリンク形式にリダイレクトされます。(p投稿page_id用、ページ用)

バグを防ぐには、このリストを確認してくださいreserved keywords

于 2013-10-16T18:56:19.407 に答える