WordPress posts outside of the install directory
-
I am attempting to put wordpress posts on my front page. My wordpress blog is located in a “blog” subdirectory while my website’s homepage is in the web root. I wrote my own SQL query to call the WP database and grab the appropriate posts, their dates, etc. From there it is inserted directly onto the page; no WP functions are used, just the straight SQL/PHP statements. I am using WP 2.0.1.
However, when I place the data on the page the normal formatting is lost. Looking at the db a bit I see that line breaks are literally in the db, not in html tags. Also, I am seeing wierd characters were I have double spaces between sentences.
From the research I’ve done I’m guessing I need to use WP’s wpautop function and maybe something else.
My question is: What functions do I need to use and how do I go about importing them into this new page outside of the wp/blog directory?
Thanks for your help.
- The topic ‘WordPress posts outside of the install directory’ is closed to new replies.