FREE eCover Software for Helping me with PHP Error (WP)

skorpion

Regular Member
Joined
Dec 28, 2008
Messages
266
Reaction score
58
OK, here's the deal. Ive got an ecover generator software that comes with Master Reseller Rights. Whoever helps me with this stupid Wordpress issue gets a copy sent to their email for free.

Here's the problem. I am getting a: Parse error: syntax error, unexpected '<' in /home/maineaf/public_html/wp-content/themes/maf/bedroom_main.php on line 31

...when adding some new php code this wordpress page template file.

This is the section of code that created the problem (after I added it)
<?php if (have_posts()) : ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("category_name=bedroom&paged=$paged"); ?>
<?php while (have_posts()) : the_post(); ?>


I have posted the code that throws an error (with the added php code)

Below that I have posted the code that throws no errors (without the newly added php code)

Can anyone help?

Oh and if you solve this, PM me your email and I'll send you the software.

CODE WITH ERROR:

PHP:
<?php get_header(); ?>

<div id="content">

	<div id="contentleft-archive">
	
		<div class="postarea-archive">
	
		<?php include(TEMPLATEPATH."/breadcrumb2.php");?> <br><br>
<center><a href="http://XXXXXXXXXX.com/bedroom-main/bedroom-subs/"><< Back to Bedroom Sub Categories</a></center><br />
<center><h1><?php the_title(); ?></h1><br /></center>

[COLOR="Red"]<?php if (have_posts()) : ?>
     <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("category_name=bedroom&paged=$paged"); ?>
        <?php while (have_posts()) : the_post(); ?>[/COLOR]

<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a>


<?php endwhile; ?>
			
						<p><?php posts_nav_link(' — ', __('« Previous Page', 'maf'), __('Next Page »', 'maf')); ?></p>
			
		</div>
				
	</div>
	
		
</div>

<?php get_footer(); ?>

CODE WITHOUT ERROR

PHP:
<?php get_header(); ?>

<div id="content">

	<div id="contentleft-archive">
	
		<div class="postarea-archive">
	
		<?php include(TEMPLATEPATH."/breadcrumb2.php");?> <br><br>
<center><a href="http://XXXXXXXXXX.com/bedroom-main/bedroom-subs/"><< Back to Bedroom Sub Categories</a></center><br />
<center><h1><?php the_title(); ?></h1><br /></center>

[COLOR="Red"]<?php query_posts('category_name=bedroom'); ?>
<?php while (have_posts()) : the_post(); ?>[/COLOR]

<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a>


<?php endwhile; ?>
			
						<p><?php posts_nav_link(' — ', __('« Previous Page', 'maf'), __('Next Page »', 'maf')); ?></p>
			
		</div>
				
	</div>
	
		
</div>

<?php get_footer(); ?>
 
Last edited:
In the inserted code you have a <?php if (have_posts()) : ?>

but you do not have a corresponding <?php endif; ?> at the end of the block
 
In the inserted code you have a <?php if (have_posts()) : ?>

but you do not have a corresponding <?php endif; ?> at the end of the block

where would the end if go?

Thanks!
 
Hey thanks! That worked! PM me your email and Ill send you that as promised.
 
No way you could send me a copy too? ;)
 
Back
Top