![]() |
Wordpress question: How to use custom field outside of wordpress but same domain
I have a domain that has wordpress running on the site but i use another script also, that is completely not wordpress and i would like to call wordpress custom fields in this script, anyone know how to do this?
For example wordpress controls sitea.com and the other script can make a page like sitea.com/page but its not a wordpress page :helpme if you understand or if you can help... |
There is nothing stopping you pulling data from the mySQL DB that WP is using.
Its one of those easy if you know how to it problems.... |
2 methods.
1. connect to the sql db and grab the info you want. 2. use xmlrpc and get the info that way. |
Quote:
I'd go with #2, though. |
Quote:
here is a quick example i put together just now http://labs.fris.net/xmlrpc/ just gets 1 post but can do anythign with xmlrpc |
Also you can use the REST API - It might be easier to learn and returns results in JSON.
http://developer.wordpress.com/docs/api/ |
Quote:
custom_tags=custom_field_name1[,custom_field_name1,...] For example, let's consider that you have a blog at http://www.yourblog.com/ and want to get values of the "thumb" and "views" custom fields. You can do it like this: http://www.yourblog.com/feed/?custom_tags=thumb,views The requested values will be included into every feed item as simple XML tags, e.g.: <item> ... <thumb><![CDATA[http://i2.cdn.turner.com/cnn/dam/assets/130217175755-37-danica-video-tease.jpg]]></thumb> <views><![CDATA[14]]></views> ... </item> |
Quote:
|
Quote:
|
All times are GMT -7. The time now is 04:21 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123