I need some step by step help here guys.
I've been trying to figure out how to embed WordPress posts INTO a pre-existing website. All of the tutorials I've found, I've had trouble with because most want you to use PHP on a page with a .php extension which I don't want. I want to incorporate the PHP into a .html page.
I searched here (found this topic http://wordpress.org/support/topic/using-php-to-embed-wordpress-posts?replies=4) and other places for tutorials.
The few tutorials I found that mention using PHP on an HTML page say that I need to add a few lines to an .htaccess file to tell the server to parse the PHP on that HTML page as if it was a PHP page. The problem is that they don't say where to put it or what to do after you add it to make it work.
I have Godaddy. I installed WordPress. I saw that it has an .htaccess file in the wordpress directory. I tried adding the lines the tutorials said to that. I also tried just creating a new .htaccess in the folder where the actual HTML file with the PHP inserted is located.
In both cases, when I saved it and refreshed the HTML page, it gave me a 403 forbidden yada yada error. I Googled that and places said it's either a permissions error or an .htaccess file blocking access but none of the places detailed how to fix that.
Anyway, I started over entirely using this tutorial:
Left as an html page, it showed a (read more) link so at least I'm getting farther because the PHP from the other tutorials I tried broke the page entirely lol When I changed it to a php page, I get this error:
Warning: require(./wordpress/wp-load.php) [function.require]: failed to open stream: No such file or directory
I can't show you the website I'm working on so pretend it's http://www.example.com. My first question is how am I supposed to link to the right directory as far as syntax goes? The tutorial says to start with this code:
<?php // Include WordPress define('WP_USE_THEMES', false); require('./wordpress/wp-load.php'); query_posts('showposts=1'); ?>
I kept my directory name as wordpress just until I can get the hang of this so it would be http://www.example.com/wordpress/wp-load.php. My HTML file I'm trying to insert the PHP into is in a different directory in http://www.example.com/other/blah.html.
How do I write the syntax in the HTML page for it to point to the proper wp-load directory?