23 thoughts on “Creating Your Own WordPress Permalink Structure For Custom Content Leave a comment

  1. I have been looking for a better way to link to urls associated with a contact and I believe this would work great.

    Thanks for sharing!

    1. Glad my post helped 🙂 Just checked out your application as well. Looks quite cool – I’ve been thinking about setting up some sort of crm theme as well!

      1. Its definitely a challenging field as there are so many competitors but the tutorials that you and Justin Tadlock, among others, have written have saved me a year in programing time and thousands of dollars. The version I am preparing for WP3.0 will be hosted in an Edublog fashion so if you do decide to create a crm theme let me know, maybe we can work something out. 🙂

  2. Awesome post. I’ve bookmarked this post. By the way, the plugin WP-Download Manager has another way to create permalink structure. I think you are interested in this.

  3. Pingback: 2 weeks in and more new features for WPVote › WordPress Vote
  4. Pingback: Top Worthwhile Tutorials of the Week – #3 | AEXT.NET
  5. Very interesting Ben,

    I was faced with doing something similar recently and took a different approach:

    Instead of rewriting, I ran a filter on the_posts which parses the URL ($wp->request). If the trigger parameter isn’t present it just returns the $posts (ie whatever was in there before the filter was run). If it finds the trigger, it creates a virtual post and returns that.

    I roughly based the virtual post creation on this:

    Via the plugin, I can set the post content ($post->post_content), post title ($post->post_title) etc.

    Anyway, if I’d found your post first, I could have used that, but my approach works well enough for me.

    1. Hey Stephen, thanks for the info. that’s an interesting approach as well – I hadn’t considered doing something like that. Thanks for the link too – it explains the concept well.

  6. Pingback: BlogBuzz February 27, 2010
  7. Pingback: Top Worthwhile Tutorials of the Week – #3 | Web Development News
  8. Pingback: What do you want me to write about?
  9. I ran a filter on the_posts which parses the URL ($wp->request). If the trigger parameter isn’t present it just returns

  10. I’m trying to use this for a plugin I’m writing, but I can’t figure out where I need to hook the bm_rewrite function into..

  11. so nice. Thanks for explaining so well, I have been looking for this information for quite some time because I really didn’t want to have to create pages manually and add shortcodes to the content to do what I wanted.

    Unfortunately, it took me so long to find this that I’m 90% through the plugin code that uses manually added pages! 🙁 .. never mind, it’s not a plugin I’m releasing.

    I’ll get to use this in a future plugin (or on the second version of this current one!)

    thanks again, great tutorial

    1. Hey Andy – glad you found this useful. I have used the functionality on a couple of sites now and it’s worked surprisingly well. It really helps to turn WordPress into a fully fledged cms creating exactly what you need.

      1. I think I’m gonna try and use it in this current project, I’ve found I need to show a popup that will need a custom template that can use wordpress functions. This might do the trick!

  12. I think something is wrong. Where will we call ‘bm_rewrite’ function?
    I tried add_filter(‘rewrite_rules_array’,’bm_rewrite’); but it gives error.
    I resaved my permalink settings but it didn’t work.

  13. Pingback: Extend Wordpress Permalinks to create Virtual Pages and Folders | DEEP in PHP
  14. Im fighting write now with permalink with wordpress.
    on my website I wrote simply plugin to just get last 4 post from my blog and now I need to create nice url like I had set in wordpress %category%post_name anyone knows how to create urls ?

Leave a Reply

Your email address will not be published. Required fields are marked *