Support » Plugins » Get Permalinks from the DB outside of WP?

  • I’m working on a Flash front end for WordPress. You can check it out here:

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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…


    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.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get Permalinks from the DB outside of WP?’ is closed to new replies.