Forums

How to use permalinks BUT run a custom script if pages contain car brands. (4 posts)

  1. Zaphod
    Member
    Posted 2 years ago #

    Hi all,

    So, just to explain, I have a car site complete with custom search engine and am using permalinks.

    So, for example, http://mysite.com/about-us/ and http://mysite.com/more-information/ work totally as normal out of the [WP] box.

    All is well.

    However, in order to better acheive Google rankings, I want also to be able to tell the permalink structure that if the url ends with a car manufacurer and / or model (which will be matched through manufacturer / model arrays) to load a custom page where I strip out the final (for example) /ford/mondeo/ and feed that into my custom search... e.g.

    http://mysite.com/ford/mondeo/

    All this while leaving the standard permalinks settings in place.

    Is this doable?

    I know (and have working) a scenario whereby if I create a page called "Ford" and tell it to use my custom template that it matches all Fords. Also if I create a subpage of Ford called "Mondeo" that works too.

    Just seems a bit of a long winded way to do it.

    Any help appreciated!!

  2. Zaphod
    Member
    Posted 2 years ago #

    Just to be clear, the reason it seems long winded is that I would have to create a custom page / subpage for every single manufacturer (along with each and every model per manufacturer).

    So if there were 72 manufacturers who each had 10 models, that's me creating 720 [essentially blank] pages.

    Still, they'd go in the sitemap I guess....

  3. alism
    Member
    Posted 2 years ago #

    Can't you just use tags?

  4. Zaphod
    Member
    Posted 2 years ago #

    Emm... not sure... maybe? Checking tags and how they work. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic