wp-load not working
-
Hi,
I am trying to load wordpress content from my site into an external web page, without success. I am using the following code:
<?php // Include WordPress define('WP_USE_THEMES', false); require('https://www.dave-tyler.co.uk/wordpress/wp-load.php'); query_posts('showposts=1'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; /> <title>Untitled Document</title> </head> <body> <?php while (have_posts()): the_post(); ?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <p><a href="<?php the_permalink(); ?>">Read more...</a></p> <?php endwhile; ?> </body> </html>
link to the page on my server:
https://dave-tyler.co.uk/tylernew/wordpress_test.phpany ideas where i’m going wrong?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘wp-load not working’ is closed to new replies.