简体   繁体   中英

WordPress Page URL rewrite Issue

I need to rewrite wordpress URL.

Currently My URL is : http://www.example.com/about/?pagekey=team1 and I need like ; http://www.example.com/about/team1

Here About is one page template and I've setup for wordpress custom parameter so, when you pass pagekey to this page it will take key and based on that display result.

Now, I need to show user friendly, can anybody have idea how to do this.

currently my parmalink is set to "PostName".

Thanks.

You should follow the WordPress codex here and create 2 files:

page-about.php single-about.php (this one will be for the teams)

you should create CPT (custom post type) with all the custom post type fields you need for this eg.

Name, Title, Position, Image, Tag, Taxonomy, .... etc

then you will pass the custom post type query (the query) before the loop and you will be able to access the single-about.php from page-about.php

that'all.

Cheers and hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM