CSV Importer, Custom Fields and URL Rewrites
I have modified my site to execute url rewrites based on custom field inputs for city and state. You can see my tutorial here:
http://kevin-smothers.com/journal/ge...links-for-seo/It works great when someone submits a listing.
The only issue I have is using the CSV Importer tool to import the listings.
I have added the custom fields to the importer through the functions.php file, as well as the csv importer template.Everything uploads fine, except the url rewrite doesn't work correctly now with the imported listings 100%.
When you import a listing, it automatically saves the url as:domain.com/listing/business-name (which actually produces a 404 error)that is obviously not what I need. I need this:domain.com/listing/industry/state/city/business-name (the 'industry' slug is actually the listing category, fyi)the listing does get imported though. But, when you click on the view listing at domain.com/listing/business-name, there is a 404 error page that comes up.
Oddly enough, when you write out the url the way it is supposed to be as: domain.com/listing/industry/state/city/business-name ...you come to the listing. But in the
wp-admin >> listings area, the listing urls are written as domain.com/listing/business-name. Furthermore, on the homepage which shows recent listings, the url is also the domain.com/listing/business-name url even though that goes to a 404 page.
This leads me to believe that for some reason, imported urls are being rewritten in a separate area from the 'add listing' feature.
Can you please share with me where this is, so that I can modify it to utilize the url rewrite rules that I created for the site?
I see the importer.php file, but I don't see anything about url rewrites in there. I've spent a few weeks on this url rewrite situation, and everything works except when I import listings. I even shared the 15-20 hours worth of work with AppThemes customers as a courtesy.
I need some good karma to take place with my request please. The custom fields are added, and if I write the url out for the listing with the proper slugs, everything works, but it isn't listed correctly in
wp-admin, nor on the site.
I've been in the hospital a few times over the last couple of days, due to a serious toothache and my brain is mush right now. I really need some AppThemes help with this one.
Please look at my code to see what I've done, and help me with this final piece...please.
EDIT(UPDATE): I've also added the industry/state/city/ slugs within the csv importer 'slug' field, but it strips out the '/' automatically, so I can't just concatenate the slugs into that field of the importer, like I had hoped.
Last edited by vegaskev; October 30th, 2012 at 05:59 PM.
Reason: added update