0

So I built a site (In the wrong way which I can see now).

Users can post ads, they are not stored as a post, I just store the information in a table in the database.

I use a page template with parameters passed in - For example www.site/ad/?id=1&cid=2

id = id from database cid = category id from database

I then use a wordpress page, pull params from url and load all information from DB relating to the id and category id.

In the wordpress admin there is a page set - the page uses an ad detail template for all urls that are www.site/ad/?

What I want to do now is put the ad title in the url so www.site/ad/adtitle/?id=1&cid=2

The issues with this is the page will not load as the permalink now does not correspond

perma link is www.site/ad/? so cannot use www.site/ad/adtitle/? and still load the page with template.

I guess the question is can I make so that the page will load the url with the ad title in

I try to set permalinks to allow custom structure but no luck

Apologies about title didn't know what to call this

user2389087
  • 1,692
  • 3
  • 17
  • 39
  • try by preparing a new page with permalink adtitle and make it as a subpage of your current page. Set your current page template to the newly built page. So, your new url will be www.site/ad/adtitle and go ahead with your work. – WpTricks24 Oct 03 '14 at 19:35

1 Answers1

0

Fixed it with pods, which will allow you to use a page referencing a part of a url

http://blog.stefanxo.com/2014/02/how-to-create-a-pods-page/

Thanks

user2389087
  • 1,692
  • 3
  • 17
  • 39