• I’m trying to set up an archive for my website. I used the tutorial at this link and all seems to be working well on the archives page that I set up:

    http://rebeccajoneshowe.com/?page_id=181

    However, when I click on a link to access the monthy or category archives, I get this message:

    Parse error: syntax error, unexpected ‘>’ in /home/ressiemo/public_html/wp-content/themes/starkers/archive.php on line 1

    This is the code on my archive.php file:

    <?php<br>
    
    /**<br>
    
     * Template Name: Archives Template<br>
    
     * Description: A Page Template that lets us created a dedicated Archives page<br>
    
     *<br>
    
     * @package WordPress<br>
    
     * @subpackage Twenty_Eleven<br>
    
     * @since Twenty Eleven 1.0<br>
    
     */<br>
    
    <br>
    
    get_header(); ?><br>
    
    <br>
    
    		<div id="primary"><br>
    
    			<div id="content" role="main"><br>
    
                              <br>
    
    		          <h1 class="entry-title"><?php the_title(); ?></h1><br>
    
                              <?php the_post(); the_content();  ?><br>
    
    <br>
    
                              <!-- The main functions of our Archives.php template will go below here --><br>
    
    <br>
    
                                <?php get_search_form(); ?><br>
    
    		<br>
    
    		            <h2>Archives by Month:</h2><br>
    
    		            <ul><br>
    
    			     <?php wp_get_archives(); ?><br>
    
    		             </ul><br>
    
    		<br>
    
    			    <h2>Archives by Subject:</h2><br>
    
    			    <ul><br>
    
    			      <?php wp_list_categories(); ?><br>
    
    		            </ul><br>
    
    <br>
    
                              <!-- The main functions of our Archives.php template will go above here --><br>
    
    <br>
    
    			</div><!-- #content --><br>
    
    		</div><!-- #primary --><br>
    
    <br>
    
    <?php get_footer(); ?>

    Unfortunately, I can’t seem to spot what the problem is on “line 1”, nor can I find any specific information online about how to fix my specific problem.

    Any help would be appreciated! Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • If that is the code for your custom Archive page template, then it is completely and utterly broken. All of those <br> tags need to be removed. What have you need editing it in?

    Thread Starter bekanator

    (@bekanator)

    That was the code on the archive.php file on my site. It was never edited, as far as I can remember. I don’t really edit .php files because I really don’t know what I’m doing when it comes to them, so if I did edit it in the past it was just through Notepad.

    I tried searching the internet for a basic WordPress archive.php file, but I can’t seem to find one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Parse error on archive.php file!’ is closed to new replies.