Hey,

I'm wanting to show posts from a wordpress blog on another part of my site which isn't wordpress and I've got the code to do that but I'm wanting to show the last 10 posts in a collapsible panels.

I tried using this for it
PHP Code: 
<?php
// Include Wordpress 
define('WP_USE_THEMES'false);
require(
'./news/wp-load.php');
query_posts('showposts=4');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php while (have_posts()): the_post(); ?>
<?php 
endwhile; ?>
<?php 
while (have_posts()): the_post(); ?>
<div id="CollapsiblePanel1" class="CollapsiblePanel">
  <div class="CollapsiblePanelTab" tabindex="0"><?php the_title(); ?></div>
  <div class="CollapsiblePanelContent">
<?php the_content(); ?></div>
</div>
<script type="text/javascript">
<!--
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
//-->
</script>
<?php endwhile; ?>
</body>
</html>
And it works for the first post but it doesn't for the next posts.

anyone got any ideas.

EDIT: Figured it out used some sort of jQuery to get it working
SceneMan Reviewed by SceneMan on . Collapsible panels wordpress help Hey, I'm wanting to show posts from a wordpress blog on another part of my site which isn't wordpress and I've got the code to do that but I'm wanting to show the last 10 posts in a collapsible panels. I tried using this for it <?php // Include Wordpress define('WP_USE_THEMES', false); require('./news/wp-load.php'); query_posts('showposts=4'); Rating: 5