Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » WordPress »

Parse error: syntax error, unexpected $end

Estas en el tema de Parse error: syntax error, unexpected $end en el foro de WordPress en Foros del Web. Estimados, encuentro el error: Parse error: syntax error, unexpected $end in /home/mundocam/public_html/wp-content/themes/fashionistas/content-single.php on line 97 Perdón por mi ignorancia pero no se solucionarlo... Aquí se ...
  #1 (permalink)  
Antiguo 30/03/2015, 09:55
Avatar de chacabuco  
Fecha de Ingreso: octubre-2010
Ubicación: Buenso Aires
Mensajes: 85
Antigüedad: 13 años, 6 meses
Puntos: 0
Parse error: syntax error, unexpected $end

Estimados, encuentro el error:

Parse error: syntax error, unexpected $end in /home/mundocam/public_html/wp-content/themes/fashionistas/content-single.php on line 97

Perdón por mi ignorancia pero no se solucionarlo...
Aquí se puede ver en el link:
http://mundocamis.com/sentimientos-mi-primera-obra/

Agradeceré cualquier tipo de información que me ayude a solucionarlo.
:)
  #2 (permalink)  
Antiguo 30/03/2015, 10:02
Avatar de XLogus  
Fecha de Ingreso: noviembre-2008
Ubicación: AQP
Mensajes: 495
Antigüedad: 15 años, 5 meses
Puntos: 19
Respuesta: Parse error: syntax error, unexpected $end

Ese mensaje significa que pusiste un if o un while sin cerrarlo, busca donde falta su lllave de cierre
  #3 (permalink)  
Antiguo 30/03/2015, 10:06
Avatar de chacabuco  
Fecha de Ingreso: octubre-2010
Ubicación: Buenso Aires
Mensajes: 85
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: Parse error: syntax error, unexpected $end

Hola XLogus, gracias por responderme.
Aparentemente el error está aqui:

if ( '' != $tag_list ) {

$meta_text = __( '<span class="cat-links"><i class="ico-folder"></i> %1$s</span><span class="tags-links"><i class="ico-tags"></i> %2$s</span>', 'athemes' );

}

pero la llave está... no se que mas me falta.
Podrás ayudarme?
  #4 (permalink)  
Antiguo 30/03/2015, 11:30
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: Parse error: syntax error, unexpected $end

No siempre el error hace referencia a un if especifico, por ejemplo puedes tener un if, una funcion, un while o alguna otra cosa que requiera cerrar con una llave, algo como....

Código PHP:
Ver original
  1. function xxx(){
  2. if(x){
  3. }

Notece que en el ejemplo es poco codigo pero en una funcion bastante extensa este mismo caso podrias darlo por correcto cuando en realidad te falta una llave de cierre.
  #5 (permalink)  
Antiguo 30/03/2015, 12:18
Avatar de chacabuco  
Fecha de Ingreso: octubre-2010
Ubicación: Buenso Aires
Mensajes: 85
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: Parse error: syntax error, unexpected $end

Hola Arturo, gracias por responderme.
Yo no se de PHP pero entiendo que en este pedazo de código está la llave que correspode.
Copio mas abajo el código completo para ver si ustedes que saben me pueden decir donde tengo que agregarla.
Desde ya muchas gracias!!

<?php

/**

* @package aThemes

*/

?>



<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>

<header class="entry-header">

<h1 class="entry-title"><?php the_title(); ?></h1>



<div class="entry-meta">

<?php athemes_posted_on(); ?>



<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>

<span class="comments-link"> <?php comments_popup_link( __( 'Escribe un comentario', 'athemes' ), __( '1 Comment', 'athemes' ), __( '% Comments', 'athemes' ) ); ?></span>

<?php endif; ?>

<!-- .entry-meta --></div>

<!-- .entry-header --></header>



<div class="clearfix entry-content">

<?php the_content(); ?>

<?php

wp_link_pages( array(

'before' => '<div class="page-links">' . __( 'Pages:', 'athemes' ),

'after' => '</div>',)

);

?>

<!-- .entry-content --></div>



<footer class="entry-meta entry-footer">

<?php

/* translators: used between list items, there is a space after the comma */

$category_list = get_the_category_list( __( ', ', 'athemes' ) );



/* translators: used between list items, there is a space after the comma */

$tag_list = get_the_tag_list( '', __( ', ', 'athemes' ) );



if ( ! athemes_categorized_blog() ) {

// This blog only has 1 category so we just need to worry about tags in the meta text

if ( '' != $tag_list ) {

$meta_text = __( '<span class="tags-links"><i class="ico-tags"></i> %2$s</span>', 'athemes' );

}



} else {

// But this blog has loads of categories so we should probably display them here

if ( '' != $tag_list ) {

$meta_text = __( '<span class="cat-links"><i class="ico-folder"></i> %1$s</span><span class="tags-links"><i class="ico-tags"></i> %2$s</span>', 'athemes' );

}
  #6 (permalink)  
Antiguo 30/03/2015, 16:09
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: Parse error: syntax error, unexpected $end

suponiendo que ese es todo el codigo, este else no esta cerrado

} else {

// But this blog has loads of categories so we should probably display them here

Etiquetas: php
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:45.