WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using wordpress functions in custom php script (3 posts)

  1. dsovino
    Member
    Posted 5 years ago #

    Hello everyone. A brief description first:

    I'm developing an as3 video player for a wp theme. In the theme, I've got a php script in a file that I use inside actionscript. This script generates a xml file with metadata from a particular post (custom fields, category, etc).

    Inside the player, I'm trying to add html text, in particular html links to the Categories where the post belongs to (did u get that?? :S).

    To get all the above, I retrieve the data directly from the database. But, as you may expect, i can't get the categories links html from there. I know i can generate this by hardcoding the url with the catID (which I already got) inside actionscript. I wonder though what would happen if my client wants to use permalinks.

    I assume that the "get_category_link( $category_id )" function can get the job done, regardless if wp is using permalinks or not. So this is the deal:

    Since my script doesn't interact at all with wordpress (i get everything from mysql), i can't call any wordpress funtion inside my script. What files would i have to include inside my php in order to get access to wp functions? Or should I just create some vars and write configure this by hand on my script??

  2. MichaelH
    Member
    Posted 5 years ago #

  3. dsovino
    Member
    Posted 5 years ago #

    require_once("../../../wp-blog-header.php");

    thanx a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic