I have a custom template set on all my Pages, it loads the template fine, now I need to switch into fetching data from the database based on the post name.
mysite.com/cars -> page name [cars]
Page [cars] loads the home.php template:
home.php
<?php
get_header();
//get name of page [cars] use it to retrieve from a custom table
//with the primary key [cars]
get_footer();
?>
do I have to parse the URL to extract the name or is there someway I can provide wordpress the name. I dont see an option to set it on the posts page.