4 Replies - 384 Views - Last Post: 28 March 2013 - 08:50 AM Rate Topic: -----

#1 rrhyox  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-March 13

Php Error "<" please help

Posted 28 March 2013 - 08:31 AM

i have this template blog for my site and it always gives me an error of unexpected "<"

<?php
/*
 WARNING: This file is part of the core Genesis framework. DO NOT edit
 this file under any circumstances. Please do all modifications
 in the form of a child theme.
 */

/**
 * Template Name: Blog
 * This file handles blog post listings within a page.
 *
 * This file is a core Genesis file and should not be edited.
 *
 * The blog page loop logic is located in lib/structure/loops.php
 *
 * @category Genesis
 * @package  Templates
 * @author   StudioPress
 * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link     http://www.studiopress.com/themes/genesis
 */
 
<?php
/*
Template Name: MyFront
*/
?>

<?php get_header(); ?>

	<div id="content" class="narrowcolumn">

<?php
$args = array('posts_per_page' => 1, 'cat' => 1);
$the_query = new WP_Query( 'posts_per_page=1','cat=1' );
$the_query = new WP_Query( $args );
// The Loop
while ( $the_query->have_posts() ) :
	$the_query->the_post(); ?>

			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

				<div class="entry">

					<?php	the_content('Read the rest of this entry »'); ?>
				</div>
				

				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
			</div>
					
		<?php endwhile; ?>


		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
		</div>

	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php get_search_form(); ?>

<?php wp_reset_postdata(); ?>

	</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
genesis();


This post has been edited by modi123_1: 28 March 2013 - 08:35 AM
Reason for edit:: fixed botched code tag


Is This A Good Question/Topic? 0
  • +

Replies To: Php Error "<" please help

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9214
  • View blog
  • Posts: 34,611
  • Joined: 12-June 08

Re: Php Error "<" please help

Posted 28 March 2013 - 08:36 AM

... and no line number?
Was This Post Helpful? 0
  • +
  • -

#3 rrhyox  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-March 13

Re: Php Error "<" please help

Posted 28 March 2013 - 08:40 AM

what you mean no line number?

im always getting unexpected "<" error?
Was This Post Helpful? 0
  • +
  • -

#4 DoxramosPS  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 174
  • Joined: 07-October 12

Re: Php Error "<" please help

Posted 28 March 2013 - 08:43 AM

<?php
/*
WARNING: This file is part of the core Genesis framework. DO NOT edit
this file under any circumstances. Please do all modifications
in the form of a child theme.
*/

/**
* Template Name: Blog
* This file handles blog post listings within a page.
*
* This file is a core Genesis file and should not be edited.
*
* The blog page loop logic is located in lib/structure/loops.php
*
* @category Genesis
* @package Templates
* @author StudioPress
* @license http://www.opensourc...gpl-license.php GPL v2.0 (or later)
* @link http://www.studiopre.../themes/genesis
*/

<?php
/*
Template Name: MyFront
*/
?>


You're opening a new PHP tag without closing the previous one. Be a bit easier if you said the line number.... but based off what I see here that's what I would think is causing it.
Was This Post Helpful? 1
  • +
  • -

#5 rrhyox  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-March 13

Re: Php Error "<" please help

Posted 28 March 2013 - 08:50 AM

thanks!! i got it i delted the exceed <?php and the else staement. it now working
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1