The MU forums have moved to

Custom guid not stored in database (3 posts)

  1. fogster
    Posted 14 years ago #

    WordPress always defaults to using a "good" URL like /2008/08/wordpress-guids-demystified instead of ?p=1234

    I'm finding that it's rarely saving that good guid to the database, though. Most are of the ?p=1234 format. If I hit them that way, I get a redirect to the "good" URL. This much is good, but it would make my life much easier if the guid stored in the database were the final, SEO-friendly URL.

    Is this a bug or is there a configuration I overlooked?

    (PS - I searched, but Google matches "guide" in addition to "guid," and it turns out that there are lots of WPMU guides...)

    Edit: It looks like older posts had the full "friendly" URL saved pretty consistently, but around June, they stopped. My guess is an upgrade changed what was saved and reverted to saving ?p=1234-format posts in the guid field.

  2. SteveAtty
    Posted 14 years ago #

    But why do you need to worry about what is in the GUID? if you use get_blog_permalink then you get the permalink with the currently defined nice urls are. So that way peramlinks are always consistent.

  3. fogster
    Posted 14 years ago #

    I had a backend script that was pulling the URLs right from MySQL, which is why I've been pulling out my hair.

    Maybe it would be easier if I was able to hook into enough of the WP code to call get_blog_permalink on them... I'm not too familiar with the internals, so that hadn't occurred to me.


About this Topic