Title: codelizard's Replies | WordPress.org

---

# codelizard

  [  ](https://wordpress.org/support/users/codelizard/)

 *   [Profile](https://wordpress.org/support/users/codelizard/)
 *   [Topics Started](https://wordpress.org/support/users/codelizard/topics/)
 *   [Replies Created](https://wordpress.org/support/users/codelizard/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/codelizard/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/codelizard/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/codelizard/engagements/)
 *   [Favorites](https://wordpress.org/support/users/codelizard/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Weird issue](https://wordpress.org/support/topic/weird-issue-2/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/weird-issue-2/#post-3872556)
 * It is neither a custom post type nor taxonomy. I dont have any special rewrite
   rules in the .htaccess.
 * I add a rewrite rule for this: ‘vendors(/?.*)?’ just so wordpress doesnt send
   me to the 404 page. Then, I use a filter for “template_include” where I check
   the URL. If the first section of the url is “vendors”, I then send them to my
   Vendors template.
 * All of my work then happens in the vendors template.
 * The issue seems to be if the url ends in “/”, and is not a direct hit on an existing
   url, it is doing a keyword search on the last parm in the string and redirecting
   to that article.
 * By changing the way I do my URLS to end in “.html”, this no longer happens. I
   would still like an explanation, but for the moment this is working. I even just
   got done creating all of the 301 redirects for the 200+ urls I just changed.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Weird issue](https://wordpress.org/support/topic/weird-issue-2/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/weird-issue-2/#post-3872520)
 * Ok, I finally figured out that this is a fruitless exercise. I tried changing
   the number of parms, so it wasnt the third parm and no matter what I did, it 
   always ended up the same. So, instead of my URLS doing this:
 * [http://www.guitarnewsdaily.com/vendors/amps/yamaha/](http://www.guitarnewsdaily.com/vendors/amps/yamaha/)
 * They now do this:
 * [http://www.guitarnewsdaily.com/vendors/amps/yamaha.html](http://www.guitarnewsdaily.com/vendors/amps/yamaha.html)
 * And they work great. I still wish I knew WHY it was doing the above, but I’ve
   now worked around it.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Weird issue](https://wordpress.org/support/topic/weird-issue-2/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/weird-issue-2/#post-3872497)
 * More information:
 * I’ve been tracing this, and this is whats happening:
 * I have an add_filter call for “template_include”, which is used to find which
   template I am using. This is how I send everything starting with “/vendors” to
   my own template for processing.
 * Unfortunately, the URL is being redirected to the new one before the template_include
   call is made. Hence, skipping my vendor section.
 * Still looking for help!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Custom plugin with heirarchy of SEF pages](https://wordpress.org/support/topic/custom-plugin-with-heirarchy-of-sef-pages/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/custom-plugin-with-heirarchy-of-sef-pages/#post-3431571)
 * oops, forgot to mark it resolved.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Custom plugin with heirarchy of SEF pages](https://wordpress.org/support/topic/custom-plugin-with-heirarchy-of-sef-pages/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/custom-plugin-with-heirarchy-of-sef-pages/#post-3431569)
 * Ok got this. The solution was to use the rewrite api, as mentioned above, to 
   look for the pattern /vendors/, letting it know that it was a valid URL. Coupled
   with my existing template override, this is what I needed.
 * On a side note, in regards to the custom post type, this data is actually in 
   a completely third-party system utilizing its own database. Doing the code this
   way, I’m able to leverage the data from the existing system which handles all
   of the adds, updates, deletes, etc without needing to write a bridge to duplicate
   the data into the wordpress db and keep them in sync. This is a better solution
   for our situation…
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Custom plugin with heirarchy of SEF pages](https://wordpress.org/support/topic/custom-plugin-with-heirarchy-of-sef-pages/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/custom-plugin-with-heirarchy-of-sef-pages/#post-3431550)
 * So, a thought. Maybe I do have a “page” for each vendor. I could write a batch
   job to run through the DB and create a page for each entry in my DB, and then
   write a piece of code to do all of the DB stuff each time I add/edit/delete a
   record in our main database.
 * Besides that, the only other thing I could think of was trying to put all of 
   our data into wordpress as a custom post type, but with all of my requirements
   I’m sure it would work either.
 * Nothing from the experts on this? Even a gentle kick in the right direction?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Category pages not working](https://wordpress.org/support/topic/category-pages-not-working-2/)
 *  Thread Starter [codelizard](https://wordpress.org/support/users/codelizard/)
 * (@codelizard)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/category-pages-not-working-2/#post-2014968)
 * Ok, I believe I solved the issue. It’s odd, but here is what I did.
 * Back in version, oh, 2.something, we changed our permalinks to “topics” instead
   of “category”. Well, the “topics” links are the one that werent working.
 * So, after rebuilding the database and all kinds of things, i finally decided 
   to go into the permalinks settings and just re-click “SAVE”. It already knew 
   to use “topics” as my category base, all i had to do was “SAVE CHANGES”.
 * And guess what? It all started working. The category links now work.
 * Go figure.
 * Figured I would share this for anyone else who had the same issue.

Viewing 7 replies - 1 through 7 (of 7 total)