Function to remove non alphanumeric characters when using %postname% Permalinks

  • Unknown's avatar

    Hi I have wordpress installed on my server. I want to access the MySQL database directly to pull up posts on a specific category and creat links to them on a separate non-wordpress page/site. This is pretty easy for me and that is not the issue.

    The issue is I am using a custom Permalink:
    /%year%/%monthnum%/%day%/%postname%/

    I want to be sure of how WordPress “cleans” the titles of each post to transform them into urls. e.g. “News item of the day: becomes “news-item-of-the-day” Perhaps they use preg_replace?

    Whatever the method, can someone tell me EXACTLY how it is done so when I do my thing my links will match. This is actually kind of tricky to make sure they ALWAYS match up.

    If there is a different way for me to do this please let me know. The feed page for WordPress shows all posts but not ones from a specific category. Still, I’d prefer to hit the db directly if possible.

    Thanks

  • Unknown's avatar
  • Unknown's avatar

    You’re at the wrong site. We don’t have access to changing our permalinks with the version of wordpress that we’re running here. You must be hosted elsewhere. The software support sitte is over at http://wordpress.org

    And, as Judy hints at, it’s always best to read a post labeled “Please read me first before posting” as it usually contains important information.

    Good luck,
    -drmike

  • The topic ‘Function to remove non alphanumeric characters when using %postname% Permalinks’ is closed to new replies.