Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

How to import themeforest items as WordPress posts WordPress

  • SOLVED

I'm thinking the import feature would be best? The Themeforest API can generate XML or CSV which could be converted to the correct WP import format.

Answers (3)

2011-01-01

Ali Hussain answers:

If the XML can be possessed a simple wordpress import feature can import the XML.

In the wp-admin

TOOLS -> IMPORT -> WORDPRESS
upload your xml file


Dusty Anderson comments:

Hi Stranger! ;)

I have seen some XML's generated that produce some info. But what I truly need is the item image, url, title, tags.

If I can get an XML or CSV file that produces those parameters for all WordPress items in ThemeForest, I can hack it up to the right format for WordPress import using Excel.

Cyrus

2011-01-01

Denzel Chia answers:

Hi,

I don't think you know how an this API works.
You need to write a script to request and parse the return data.
A request script can be in any server side program language, but the return data by theme forest api is either JSON or XML, depending on your script request.

The return XML is not an XML file, you cannot download it or save as XML.
You need a script to parse this xml data, which means read the data and produce and save as an XML file or in the case of WordPress, use wp_insert_post to insert it as post.

conclusion is what you want can only be achieve by coding.
And yes this should be a coding question.

I am just explaining the theory to you. No code provided.

Thanks.


Denzel Chia comments:

Anyway, this could be the url that you want.
It returns 50 items, which is what the search API says.

http://marketplace.envato.com/api/v1/search:themeforest,wordpress,xml.xml

See if it is of any use to your hacking. just play around with the parameters.

Thanks.


Dusty Anderson comments:

Thanks Denzel,
So there is no way to have the API produce more than 50 themes at a time?

Cyrus


Denzel Chia comments:

Hi,

According to their API document, there is not way to have more than 50 themes at a time.
There should be a start and max results perimeter in order to allow queries of any numbers of themes.

Thanks.

2011-01-01

Josh Emans answers:

I would recommend using json for PHP, then using [[LINK href="http://codex.wordpress.org/Function_Reference/wp_insert_post"]]wp_insert_post[[/LINK]] to insert the posts. You could run the job via CRON (t).


Dusty Anderson comments:

Hi Josh,
Thanks for the quick answer. I was hoping to avoid PHP because I don't know it and would definitely cost more for a coded solution. But if that's the only way, I'll need to bite the bullet.

I was hoping it could be a simple URL that generates XML. I really only need to do this once every couple months, it doesn't need to be automatic thankfully.

Cyrus