php - Wordpress loop inside of function = fatal error -


I have my WordPress blog at blog.mysite.com, and on www a completely different site (in my framework Created) mysite.com.

I know that blogs and other sites are on the same server, and there are correct permissions, so I can experiment with non-blog sites to syndicate the following blogs "blog": < / P> Define ('WP_USE_THEMES', Incorrect); Required ('/ var / www / vhosts / mysite / subdomain / blog / httpdocs / wp-config.php'); Query_posts ('showposts = 5');

... and then run a loop on the page.

The problem is that since my non blog site is a framework, everything except the controller in front of me remains in the function - and this is causing the following error for me:

(BTW, I'm quite a fact that this code is said inside a function that generates errors ... when I put the code on the front controller (not in the function) Ruti vanishes)

I have no idea how to do this should indite recent blog entries on your non-blog site?

Well I think you forgot to write

 inside the function  Global $ wpdb  


Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -