1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'PHP & Perl' started by skorpion, Feb 4, 2010.

  1. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    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') : 1query_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: Feb 4, 2010
  2. quadratic

    quadratic Registered Member

    Joined:
    Oct 26, 2009
    Messages:
    69
    Likes Received:
    46
    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
     
    • Thanks Thanks x 1
  3. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    where would the end if go?

    Thanks!
     
  4. skorpion

    skorpion Regular Member

    Joined:
    Dec 28, 2008
    Messages:
    266
    Likes Received:
    55
    Hey thanks! That worked! PM me your email and Ill send you that as promised.
     
  5. iq465

    iq465 Regular Member

    Joined:
    Sep 12, 2009
    Messages:
    276
    Likes Received:
    58
    Occupation:
    Graphic Designer / Record Label
    Location:
    Chicago
    Home Page:
    No way you could send me a copy too? ;)