I'm developing a Wordpress site, that loads most of the content from SugarCRM.
Currently I get the boats item on URL like
http://domain.com/boats/?id=123456789
but I would like to have nice URL's, with the name that is loaded from SugarCRM, like
http://domain.com/boats/this-is-boat-name
Is there a way to do this without creating custom post type and a post for each item in Wordpress?
You could try using
add_rewrite_rule
.Have the user access the page via the url
domain.com/boats/12345/this-is-boat-name/
Then you can pick up the ID in PHP as if it were a
$_GET
query string.First the rewrite rules;
And then the filter so you can access the page URL as like a query string
Then, on the page template in your theme, you can pick up the (invisible) query string values like:
Make sure to flush the permalinks after adding the rewrite rules and filter into your functions.php