Problema de sintaxis en single.php

  • Autor Autor MatComa
  • Fecha de inicio Fecha de inicio
M

MatComa

Dseda
SEO
Hola Betas,

Tengo un sitio con el theme Techcutive y al entrar en cualquier articulo publicado me da el siguiente error:

Parse error: syntax error, unexpected T_VARIABLE in........ /wp-content/themes/Techcutive/single.php on line 39


Tras revisarlo y darle miles de vueltas no logro encontrar o ver ese error, aquí os dejo el single.php haber si alguno logra encontrar donde esta el error

PHP:
<?php get_header(); ?>
<section id="primary">
  <div id="content" role="main">
  <div class="post-line">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   <article <?php post_class() ?> id="post-<?php the_ID(); ?>">    <header>     <h1><?php the_title(); ?></h1>     <?php include (TEMPLATEPATH . '/includes/meta.php' ); ?>    </header>
	
	<?php $sgtop = get_option('techcutive_showsingle'); if ($sgtop == "true") { ?>
	<div class="singleads">
	<?php include (TEMPLATEPATH . '/ads/ads336.php' ); ?>
	</div>
	<?php } ?>
    <div class="entry-content">     <span class="home-cat pad-10"><?php the_category(', ') ?></span>     <?php the_content(); ?>
	 
	<?php $sgend = get_option('techcutive_showsgend'); if ($sgend == "true") { ?>
	<div class="singleads">
	<?php include (TEMPLATEPATH . '/ads/ads336.php' ); ?>
	</div>
	<?php } ?>
	    </div>

		    <footer class="post-end single-end">
			 <div class="single-left">
			 <div class="legend">Comparte esta nota:</div>
              <ul class="single-social">
			    <li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink() ?>" data-text="Interesante Articulo:<?php the_title(); ?>" data-count="vertical">Tweet</a></li>
				<li><div class="fb-like" data-href="<?php the_permalink() ?>" data-send="false" data-layout="box_count" data-show-faces="false"></div></li>
				<li><div class="g-plusone" data-size="tall" data-href="<?php the_permalink() ?>"></div></li>
			  </ul>
			 </div>
			 <div class="single-right">
			   <div class="legend">Etiquetas:</div>
			   <?php the_tags('', ''); ?>
			 </div>
			  <div class="clear"></div>
			</footer>
		</article>
		
		<aside class="relatedposts">			  <?php$categories = get_the_category($post->ID);if ($categories) {	$category_ids = array();	foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;		$args=array(		'category__in' => $category_ids,		'post__not_in' => array($post->ID),		'showposts'=>5, // Number of related posts that will be shown.		'ignore_sticky_posts'=>1	);	$my_query = new wp_query($args);	if( $my_query->have_posts() ) {		echo '<span class="home_title mar-15">Quiza tambien le interese: </span><ul>';		while ($my_query->have_posts()) {			$my_query->the_post();		?>			<li><h2><a href="<?php the_permalink() ?>" rel="bookmark"><span class="related-arrow"></span><?php the_title(); ?></a></h2></li>		<?php		}		echo '</ul>';	}}wp_reset_query(); ?>
			  
		</aside>

	<?php comments_template(); ?>

	<?php endwhile; endif; ?>
   </div>
   </div><!-- content -->
</section><!-- primary -->
<?php get_sidebar(); ?>

<?php get_footer(); ?>

Salu2
 
Cual es la línea 39 de esa código ?

Haber prueba remplazando esto:

<?php the_permalink() ?>

Por esto:

<?php the_permalink(); ?>
 
La linea 39 según aptana es

PHP:
<div class="singleads">

que también sale en la linea 22

---------- Post agregado el 07-mar-2013 hora: 12:00 ----------

Cual es la línea 39 de esa código ?

Haber prueba remplazando esto:

<?php the_permalink() ?>

Por esto:

<?php the_permalink(); ?>

eso aparece en varias lineas, seria codificarlo en todas? o en cuales?

Salu2
 
[MENTION=21826]MatComa[/MENTION] El fallo está en esta linea:

<aside class="relatedposts"> <?php$categories = get_the_category($post->ID);


Tienes que separar la apertura de php de la variable

<?php $categories
 
[MENTION=21826]MatComa[/MENTION] El fallo está en esta linea:

<aside class="relatedposts"> <?php$categories = get_the_category($post->ID);


Tienes que separar la apertura de php de la variable

<?php $categories

Gracias pero tras modificarlo me continua dando el mismo error
 
[MENTION=21826]MatComa[/MENTION] El código esta fatal, quita el siguiente comentario, debes quitar todo, includio el "."

// Number of related posts that will be shown.

si te fijas ese comentario esta haciendo que el resto de código bueno no se ejecute porque no hay un salto de linea.
 
[MENTION=21826]MatComa[/MENTION] El código esta fatal, quita el siguiente comentario, debes quitar todo, includio el "."

// Number of related posts that will be shown.

si te fijas ese comentario esta haciendo que el resto de código bueno no se ejecute porque no hay un salto de linea.

Te refieres a quitar lo que resalto en negrita, o algo mas?

<aside class="relatedposts"> <?php$categories = get_the_category($post->ID);if ($categories) { $category_ids = array(); foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id; $args=array( 'category__in' => $category_ids, 'post__not_in' => array($post->ID), 'showposts'=>5, // Number of related posts that will be shown. 'ignore_sticky_posts'=>1 ); $my_query = new wp_query($args); if( $my_query->have_posts() ) { echo '<span class="home_title mar-15">Quiza tambien le interese: </span><ul>'; while ($my_query->have_posts()) { $my_query->the_post(); ?> <li><h2><a href="<?php the_permalink() ?>" rel="bookmark"><span class="related-arrow"></span><?php the_title(); ?></a></h2></li> <?php } echo '</ul>'; }}wp_reset_query(); ?>

</aside>


---------- Post agregado el 07-mar-2013 hora: 14:34 ----------

Gracias [MENTION=18523]sparrowsitn[/MENTION] elimine lo que puse en negrita que me decias y todo solucionado :encouragement:
 
[MENTION=21826]MatComa[/MENTION] de nada, para eso estamos 😉
 
Gracias pero tras modificarlo me continua dando el mismo error

Amigo disculpa la imprudencia, aún tendrás el theme techcutive? lo he buscado hasta morir pero nada.
 
Atrás
Arriba