I have a WordPress website with blogs on it, but I also have a HTML/Dreamweaver site.
I'd like to have the WordPress blogs automatically display on my index.html
page when I update the WordPress website.
I have a WordPress website with blogs on it, but I also have a HTML/Dreamweaver site.
I'd like to have the WordPress blogs automatically display on my index.html
page when I update the WordPress website.
Here is an example what I am using on my site to read the headings from the database:
Should be easy to adapt to also read the contents if needed.
If you dont have direct access to the database, the following script accesses the blog items from the RSS feed.
Both solutions use PHP.
If both sites hosted on same server, it is simply possible. First you have to make a PHP file for example latest-post.php. and add the code below
Place this file on your non wordpress site where your index file is and include the above latest.php where you want.
If you are using HTML file, The PHP will not exicute. You can either rename index file .html to .php or add
to your .htaccess. Take a look at Run PHP from HTML
Change the number "showposts=5" to how many posts you want, and change "cat=blogs" to "cat=your category name"