Support » Fixing WordPress » incorporating posts/pages into an html website
9 years ago
Let’s say I have a website, let’s call it http://www.website.com/
Then I have a blog, let’s call it http://www.website.com/blog/ (installed there)
How can I incorporate blog posts/pages, and any other useful wordpress tags such as archives/categories, into the html pages of the website?
No-one? I thought I had read somewhere that it’s possible?
You cant include stuff into .html pages, it have to be .php
You can can make a static wordpress page and show them and/or make your own function to pull the data from the database into your page.php
Even if you give your files the .php extension, the wordpress tags wont works on your http://www.website.com if wordpress is installed in http://www.website/blog.
Because the wordpress functions will be stored in /blog/wp-include… So there is no way to use these functions on a section of your site where wordpress is not installed.
I’m far from being a php/mySQL guru, but I fear there is no easy way to call these function anywhere else than /blog…
you can really easy show wordpress stuff on any other php page!
Actually… if your blog is at example.com/simonj/ folder
and you want to use any of the WP functions in a file at the root folder – all you have to do is this:
add to the top of the file from the root (e.g. example.com/index.php) this:
You can use any WP functions, template tags etc.
kewl kewl! 🙂
So I take that back… 🙂 There is a really easy way to do so!
Thanks moshu, and thanks gents (and gals if any). Much appreciated 🙂