Hi, I'm using both wordpress and php for the first time so please try and bear with me.
I'm trying to extract the titles of each of my wordpress blog posts and display them in a table. Extracting the the post titles to display works fine it's doing it in such a way as to display them in the correct columns that's causing me trouble.
The following is the snippet of code from my latest attempt to do this
This is someway close to working as it displays the first row correctly but the titles stop displaying in the second column of the following rows.
View attachment 341
The <while> statement seems to stop working after the first run through the loop
As I said I'm new to this so any help would be appreciated
I'm trying to extract the titles of each of my wordpress blog posts and display them in a table. Extracting the the post titles to display works fine it's doing it in such a way as to display them in the correct columns that's causing me trouble.
The following is the snippet of code from my latest attempt to do this
PHP:
<table width="700" height="240" border="0" align="center">
<?php if (have_posts()) : the_post(); ?>
<tr>
<td width="300" height="80" background="images/table5.png" style="background-repeat:no-repeat"><blockquote>
<p class="class2"><div class="post" id="post-<?php the_ID(); ?>">
<?php the_title(); ?></p>
</blockquote></td>
<td width="100px">
</td>
<?php while (have_posts()) : the_post(); ?>
<td width="300" height="80" background="images/table5.png" style="background-repeat:no-repeat"><blockquote>
<p class="class2"><div class="post" id="post-<?php the_ID(); ?>">
<?php the_title(); ?></p>
</blockquote></td>
</tr>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</table>
View attachment 341
The <while> statement seems to stop working after the first run through the loop
As I said I'm new to this so any help would be appreciated