jeudi 2 juin 2016

How to intergrate custom page into theme?

I'm build a wordpress plugin to implement an inventory system. I need urls for each project details page like the following:

/inventory/new/2016/Nissan/Versa/CA/temecula/92084/3N1CN7AP9GL870431/

I was able to get mostly like what I want by using a rewrite rule.

add_rewrite_rule('inventory/(used|new)/(\d{4})/([^/]+)/([^/]+)/[A-Z]{2}/([^/]+)/([0-9]{5})/([0-9A-Za-z]{17})/?$',
    'wp-content/plugins/inventory-feed/details.php?condition=$1&year=$2&make=$3&model=$4&city=$5&zip=$6&vin=$7','bottom');

The problem is that the details.php page that I built isn't integrated into the site theme. Is there a way to add the header/footer/etc. to the custom built page? Or am I going about this all wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire