WordPress.org

Ready to get started?Download WordPress

Forums

Get Permalinks from the DB outside of WP? (4 posts)

  1. ejkent
    Member
    Posted 8 years ago #

    I'm working on a Flash front end for WordPress. You can check it out here: http://www.ejkent.com

    Instead of using the XML/RSS feed, my guys found it easier to create additional PHP pages to pull the data out of the database directly and format it the way they need it.

    The problem this creates is broken links in the case of a Page Slug. Currently, we are using the GUID field for posts, which I thought was the permalink, but turns out it's not.

    Anyone know an efficient way to get a Post's Permalink from the database without going through WordPress or using get_permalink()? Or a way of using get_permalink() in a PHP file that's not in The Loop or in WordPress. Thanks.

  2. davidchait
    Member
    Posted 8 years ago #

    the reality is you'd be much better off using the RSS feed for all the reasons/issues noted above...

    otherwise, just recode get_permalink yourself if you've already got PHP pages serving stuff up...

    -d

  3. ejkent
    Member
    Posted 8 years ago #

    I agree with you the RSS feed would be better, but at this point I'm stuck using what we've got. They claim the RSS feed has a bunch of extra stuff in it that needs to be stripped out, so it's easier to grab directly from the database. Would like to recode the get_permalink function... where is it located so we can reverse engineer? Thanks.

  4. KipBond
    Member
    Posted 8 years ago #

    ./wp-includes/template-functions-links.php

Topic Closed

This topic has been closed to new replies.

About this Topic