Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.2k views
in Plugins by
I want to embed most recent 10 posts in my wordpress site, now i am parsing my Q2A forum using PHP DOM PARSER  to get 10 recent posts, but its not a good solution causing huge pressure on my server.

So, is there any good solution programmatically get all the recent posts in php or any other way to embed in my wordpress site.
Q2A version: latest

2 Answers

0 votes
by
selected by
 
Best answer

This is my hint not answer.

If I am you, I use Q2A RSS and WP RSS parser plugin. But in this case you may not handle comment definitely. Otherwise I call Q2A functions directly from WP and make widget by oneself.

Digression:

I think that it is a Q2A weak point that there is little API for external systems. There are various kinds of features to be located under WP, but there are few features to provide information from Q2A to other systems like Facebook, twitter and quora.

by
Thanks sama55, i'm now using javascript to show recent posts from the RSS feed, thanks for your idea.
by
Nice solution. I'm using simplepie (http://simplepie.org/). Good luck.
0 votes
by

Use Q2A Market free Plugin for WordPress... get it from here http://store.q2amarket.com/q2a-wp-pack

If you want to write own code you can use Q2A Market free script https://github.com/q2amarket/q2a-pull

Both can be used as per your choice. Plugin has template tags as well wich allows you to directly insert tags into the theme. Also has widget and Snow theme for Wordpress. However for plugin Q2A should be integreated with WP

While the script (github) can be use independently and not Q2A integreation required.

...