Categories
Wordpress

WordPress: Custom Post Permalink giving 404

In most of wordpress project we do, we have few custom post type and taxonomy. We use a nice plugin called “PODs” for the same. It is good plugin, we try some other in different project and most of them serve the purpose pretty well. But today we found something, or rather just an overlook stuff. In our project we need a taxonomy to hold “year” of manufacturing for product, client request that year to be a taxonomy (yes, out client is intelligent and know such stuffs. So?). We follow him and quickly create a taxonomy with slug “year”.

Now, what we did is we broke the permalink of wordpress. It either work for our custom post permalink or default wordpress page. We spend 5 hours to realise that “year” is one of wordpress keyword in sense that wordpress use it for “archive” or dated url permalink structure. I didn’t go in depth of why and what got it broken, but since wordpress use year it is bad idea to use it. Infact this post is reminder for me to not to use words like year, month, archive, category, date, day as my taxonomy of custom post type. They are just not good. Period.

And advice of word for pods, or any plugin that allow creation of such post type. PLEASE, put some validation to stop user from doing such things. User may not read this blog post soon.

Categories
Joyous PHP Programming Wordpress

Video Shopping Plugin

Just finish coding major stuff of Video plugin for wordpress that enable Purchase of Video and then view to only registered members. This use Paypal Express Checkout as payment gateway. Love coding on wordpress at time, though it is not as good as doing in custom CMS, but still very much a home for me now. I use couple of other plugin to support my plugin, but in all just love the expendability of WordPress. The hooks, filter they are all awesome. 

I love the concept of Hooks in wordpress than any other open source software I worked on. However still trying to figure why wordpress use so much of database query and why they do not certain function outside the loop. 

Telling more about my plugin, it allow admin to upload Video files, put their price. Then on front end choose filter to find video and add to cart using AJAX. once in cart you can proceed with checkout as wordpress user only and pay through paypal. View purchased video in MY Video pages, unless you are logged in you cannot view the video not from direct link too. 

Unfortunately this plugin is built on contract and need lot of work to make it generic to release under my belt, but if anyone need it I can still help with it :). Someday probably I can release this plugin under my name. What you think shall I release it free or paid …