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

Ayuda con Wordpress

Estas en el tema de Ayuda con Wordpress en el foro de WordPress en Foros del Web. buenas, estoy creando un theme en wordpress, pero tengo un problema que me esta trayendo por la calle de la armagura, y tras hacer pruebas ...
  #1 (permalink)  
Antiguo 02/08/2010, 18:54
 
Fecha de Ingreso: julio-2008
Mensajes: 58
Antigüedad: 15 años, 9 meses
Puntos: 0
Ayuda con Wordpress

buenas, estoy creando un theme en wordpress, pero tengo un problema que me esta trayendo por la calle de la armagura, y tras hacer pruebas y pruebas y googlear ya no me queda más opción que solicitar ayuda, y haber si alguien es capaz de solucionarme el problema. Tras está presentacion procedo a contar mi problema:

Mi problema es que cuando estoy visualizando un post (el single.php) y sus comentarios, cuando relleno el formulario para postear siempre me redirigie a un cuadro de busqueda en vez de postearme. Alguna pista?
  #2 (permalink)  
Antiguo 02/08/2010, 19:32
 
Fecha de Ingreso: julio-2008
Mensajes: 58
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Ayuda con Wordpress

Contenido single.php:

<?php get_header(); ?>

<div id="navegacion">
<ul class="navegacion" >
<li> <?php if(is_home()) { ?> <?php } ?>
<a href="<?php bloginfo('home'); ?>">Inicio</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&titl e_li='); ?>
</ul>
</div>
<br />
<div id="content">
<span class="bread">
<?php the_breadcrumb(); ?></span>
<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">

<div class="entry">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

<?php the_content('Continuar Leyendo &raquo;'); ?>
<?php wp_link_pages('<p><strong>Paginas:</strong> ', '</p>', 'number'); ?>
</div>

<div class="postmetadata">
<?php if (get_the_tags()){?>
<p>Tags: <?php the_tags('') ?></p>
<?php } ?>
<p><img style="vertical-align:-5px;" alt="categories" src="<?php bloginfo('template_directory');
?>/images/category.gif" height="16" width="16" /> <?php the_category(', ') ?> |
<?php the_author_posts_link(); ?> <?php the_date(); ?> <?php edit_post_link('Editar',' ',''); ?></p>

</div>

<?php comments_template(); ?>

</div>

<?php endwhile; ?>

<div id="navigation">
<div class="fleft"><?php next_posts_link('&laquo; Antiguos') ?></div>
<div class="fright"> <?php previous_posts_link('Nuevos &raquo;') ?></div>
</div>

<?php else : ?>

<div class="post">
<div class="entry">
<h2>No se ha encontrado</h2>
<p>Disculpe las molestias.</p>
</div>
</div>

<?php endif; ?>

</div> <!-- eof main -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
  #3 (permalink)  
Antiguo 02/08/2010, 19:32
 
Fecha de Ingreso: julio-2008
Mensajes: 58
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Ayuda con Wordpress

index.php
<?php get_header(); ?>
<div id="navegacion">
<ul class="navegacion" >
<li> <?php if(is_home()) { ?> <?php } ?>
<a href="<?php bloginfo('home'); ?>">Inicio</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&titl e_li='); ?>
</ul>
</div>
<br />
<?php get_sidebar(); ?>
<!-- Capa contenedor, capa izquierda sidebar -->

<div id="content">
<span class="bread">
<?php the_breadcrumb(); ?></span>


<!-- Bucle de los Post del Blog -->
<?php if (have_posts()) : ?> <!-- Si hay post ejecutamos el While -->
<?php while (have_posts()) : the_post(); ?>
<!-- Comienza el While -->
<div id="post-<?php the_ID(); ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a></h3>
<small><i><?php the_time('F jS, Y') ?> <!-- Por <?php the_author() ?> --></i></small>
<div >
<?php the_content('Leer el resto de esta entrada'); ?>
</div>
<p> <i>Posteado en <?php the_category(', ') ?> | <?php edit_post_link('Editar', '', ' | '); ?>
<?php comments_popup_link('Sin Comentarios »', '1 Comentario »', '% Comentarios »'); ?></i></p>
</div>
<?php endwhile; ?>
<!-- Fín del While -->

<div>
<div class="alignleft"><?php next_posts_link('&laquo; Entradas Anteriores') ?></div>
<div class="alignright"><?php previous_posts_link('Entradas Posteriores &raquo;') ?></div>
</div>

<?php else : ?>
<h2 class="center">No se ha encontrado</h2>
<p class="center">Lo sentimos mucho, pero no se ha podido encontrar lo que estaba buscando.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
</div>
<?php get_footer(); ?>

Última edición por bbv81; 02/08/2010 a las 19:36 Razón: correcion
  #4 (permalink)  
Antiguo 02/08/2010, 19:35
 
Fecha de Ingreso: julio-2008
Mensajes: 58
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Ayuda con Wordpress

Contenido search.php

<?php get_header(); ?>
<div id="navegacion">
<ul class="navegacion" >
<li> <?php if(is_home()) { ?> <?php } ?>
<a href="<?php bloginfo('home'); ?>">Inicio</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&titl e_li='); ?>
</ul>
</div>
<br />
<div id="content">

<div id="main">
<h2 id="sectiontitle">Buscar: <?php the_search_query(); ?></h2>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="entry">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<!--<?php the_content('Read more &raquo;'); ?>-->
</div>
<div class="postmetadata">
<?php if (get_the_tags()){?>
<p>Etiquetas: <?php the_tags('') ?></p>
<?php } ?>
<p><img style="vertical-align:-5px;" alt="categories" src="<?php bloginfo('template_directory'); ?>/images/category.gif" height="16" width="16" /> <?php the_category(', ') ?> | <?php the_author_posts_link(); ?> <?php the_date(); ?> | <img style="vertical-align:-5px;" alt="comments" src="<?php bloginfo('template_directory'); ?>/images/comment.gif" height="15" width="20" />
<?php comments_popup_link(__('Comentarios (0)'), __('Comentarios (1)'), __('Comentarios (%)')); ?> <?php edit_post_link('Editar',' ',''); ?></p>
</div>
<?php comments_template(); ?>
</div>
<?php endwhile; ?>

<div id="navigation">
<div class="fleft"><?php next_posts_link('&laquo; Antiguo') ?></div>
<div class="fright"> <?php previous_posts_link('Nuevo &raquo;') ?></div>
</div>
<?php else : ?>

<div class="post">
<div class="entry">
<h2>Sin resultados</h2>
<p>Lo sentimos, la b&uacute;squeda no ha tenido &eacute;xito.</p>
</div>
</div>
<?php endif; ?>

</div>

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

Última edición por bbv81; 02/08/2010 a las 19:36 Razón: correcion
  #5 (permalink)  
Antiguo 03/08/2010, 12:35
Avatar de Nekko
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Buenos Aires
Mensajes: 3.141
Antigüedad: 16 años, 1 mes
Puntos: 656
Respuesta: Ayuda con Wordpress

Cita:
Iniciado por bbv81 Ver Mensaje
Mi problema es que cuando estoy visualizando un post (el single.php) y sus comentarios, cuando relleno el formulario para postear siempre me redirigie a un cuadro de busqueda en vez de postearme. Alguna pista?
Hablamos de llenar el formulario para enviar un comentario, no?

Me imagino que tenés plantilla comments, no?
__________________
Taller para crear themes wordpress desde cero | Presupuestos para trabajos particulares vía MP
  #6 (permalink)  
Antiguo 03/08/2010, 20:59
 
Fecha de Ingreso: julio-2008
Mensajes: 58
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Ayuda con Wordpress

Hola Nekko, gracias por contestar, si, efectivamente tengo la plantilla de comentarios, y su código es el siguiente:

<?php // No borrar estas líneas
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Por favor, no abras esta página directamente. ¡Gracias!');

if (!empty($post->post_password)) { // Si hay una contraseña
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // Y no coincide con la cookie
?>

<p>Esta entrada está protegida con contraseña. Introduce la contraseña para ver los comentarios.</p>

<?php
return;
}
}

/* Esta variable es para alternar el fondo de los comentarios */
$oddcomment = 'class="alt" ';
?>

<?php if ($comments) : ?>
<h3 id="comments"><?php comments_number('Sin Respuestas', 'Una Respuesta', '% Respuestas' );?> a “<?php the_title(); ?>”</h3>
<ol>

<?php foreach ($comments as $comment) : ?>

<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
<?php echo get_avatar( $comment, 32 ); ?>
<cite><?php comment_author_link() ?></cite> Dice::
<?php if ($comment->comment_approved == '0') : ?>
<p>Tu comentario está pendiente de moderación.</p>
<?php endif; ?>
<p><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> a las <?php comment_time() ?></a> <?php edit_comment_link('editar','&nbsp;&nbsp;',''); ?></p>
<?php comment_text() ?>
</li>


<?php
/* Cambia cualquier otro comentario (trakbacks) a una clase distinta */
$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
?>

<?php endforeach; /* fin de los comentarios */ ?>

</ol>






<?php else : // esto se muestra si aún no hay comenarios ?>

<?php if ('open' == $post->comment_status) : ?>
<!-- Si los comentarios están abiertos, pero no hay comentarios. -->

<?php else : // los comentarios están cerrados ?>
<!-- Si los comentarios están cerrados -->
<p>Los comentarios están cerrados.</p>

<?php endif; ?>
<?php endif; ?>

<?php if ('open' == $post->comment_status) : ?>

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>Tu debes estar <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">conectado</a> para escribir un comentario.</p>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">




<?php if ( $user_ID ) : ?>

<p>Conectado como <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Salir de esta cuenta">Deconectarme &raquo;</a></p>

<?php else : ?>

<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
<label for="author">Nombre <?php if ($req) echo "(necesario)"; ?></label>

<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
<label for="email">Email (no se publicará) <?php if ($req) echo "(necesario)"; ?></label>

<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url">Página web</label>

<?php endif; ?>

<p><strong>XHTML:</strong> Puedes utilizar estas etiquetas: <code><?php echo allowed_tags(); ?></code></p>

<textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea>

<input name="submit" type="submit" id="submit" tabindex="5" value="Enviar Comentario" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<?php do_action('comment_form', $post->ID); ?>

</form>

<?php endif; // No borrar ?>

<?php endif; // No borrar ?>

Etiquetas: Ninguno
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 11:07.