Problema con el sidebar derecho en el index

  • Autor Autor juanmanuel
  • Fecha de inicio Fecha de inicio

juanmanuel

1
Pi
Social Media
Verificación en dos pasos activada
Verificado por Whatsapp
¡Excelente comerciante!
Suscripción a IA
Hola qe tal foro ! Tengo un problema en mi blog: Enlace eliminado ... y es que no me sale el sidebar derecho en el index .. (a pesar de que si sale en los post individuales )

Queria preguntarles cual puede ser el motivo y como se podria llegar a solucionar ?

saludos, dejo aqui los codigos de mi index y sidebar

Index

Insertar CODE, HTML o PHP:
<?php get_header(); ?>
	<center><h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div id="content" class="narrowcolumn">

	<?php if (have_posts()) : ?>

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

			<div class="post" id="post-<?php the_ID(); ?>">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Video: %s', 'minimalism'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
				<small><?php the_time(__('F jS, Y', 'minimalism')) ?> by <?php the_author() ?></small>

				<div class="entry">
					<?php the_content(__('Ver articulo completo &raquo;', 'minimalism')); ?>
				</div>

				<p class="postmetadata"><?php the_tags(__('Tags:', 'minimalism') . ' ', ', ', '<br />'); ?> <?php printf(__('Categoria %s', 'minimalism'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Editar', 'minimalism'), '', ' | '); ?>  <?php comments_popup_link(__('Sin comentarios »', 'minimalism'), __('1 Comentario »', 'minimalism'), __('% Comentarios »', 'minimalism'), '', __('Comentarios cerrados', 'minimalism') ); ?></p>
			</div>

		<?php endwhile; ?>

		<center><br />
         <?php wp_pagenavi(); ?></center>

	<?php else : ?>

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

	<?php endif; ?>

	</div>
<?php get_sidebar(); ?>

<?php get_footer(); ?>

Sidebar

Insertar CODE, HTML o PHP:
<div id="sidebar">
		<ul>
			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
			<li>
				<?php include (TEMPLATEPATH . '/searchform.php'); ?>
			</li>

			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
			<li><h2><?php _e('Author', 'minimalism'); ?></h2>
			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
			</li>
			-->

			<?php if ( is_404() || is_category() || is_day() || is_month() ||
						is_year() || is_search() || is_paged() || is_home() ) {
			?> <li>

			<?php /* If this is a 404 page */ if (is_404()) { ?>
			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
			<p><?php printf(__('You are currently browsing the archives for the %s category.', 'minimalism'), single_cat_title('', false)); ?></p>


			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the day %3$s.', 'minimalism'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('l, F jS, Y', 'minimalism'))); ?></p>

			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for %3$s.', 'minimalism'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('F, Y', 'minimalism'))); ?></p>

			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the year %3$s.', 'minimalism'), get_bloginfo('url'), get_bloginfo('name'), get_the_time('Y')); ?></p>

			<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
			<p><?php printf(__('You have searched the <a href="%1$s/">%2$s</a> blog archives for <strong>‘%3$s’</strong>. If you are unable to find anything in these search results, you can try one of these links.', 'minimalism'), get_bloginfo('url'), get_bloginfo('name'), get_search_query()); ?></p>

			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives.', 'minimalism'), get_bloginfo('url'), get_bloginfo('name')); ?></p>

			<?php } ?>

			</li> <?php }?>

			<?php wp_list_pages('title_li=<h2>' . __('Pages', 'minimalism') . '</h2>' ); ?>

			<li><h2><?php _e('Archives', 'minimalism'); ?></h2>
				<ul>
				<?php wp_get_archives('type=monthly'); ?>
				</ul>
			</li>

			<?php wp_list_categories('show_count=1&title_li=<h2>' . __('Categories', 'minimalism') . '</h2>'); ?>

			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
				<?php wp_list_bookmarks(); ?>

				<li><h2><?php _e('Meta', 'minimalism'); ?></h2>
				<ul>
					<?php wp_register(); ?>
					<li><?php wp_loginout(); ?></li>
					<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional', 'minimalism'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>', 'minimalism'); ?></a></li>
					<li><a href="http://gmpg.org/xfn/"><abbr title="<?php _e('XHTML Friends Network', 'minimalism'); ?>"><?php _e('XFN', 'minimalism'); ?></abbr></a></li>
					<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'minimalism'); ?>">WordPress</a></li>
					<?php wp_meta(); ?>
				</ul>
				</li>
			<?php } ?>

			<?php endif; ?>
		</ul>
	</div>
 
Hola master, el footer tampoco te carga.

Vamos a probar una cosita.

Proba poniendo el get_sidebar y el get_footer despues del get_header... entra en tu pagina y fijate si te cargan, no hagas caso a como se vea y avisame. :encouragement:

Te quedaria asi:

Insertar CODE, HTML o PHP:
<?php get_header(); ?>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

	<center><h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div id="content" class="narrowcolumn">

	<?php if (have_posts()) : ?>

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

			<div class="post" id="post-<?php the_ID(); ?>">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Video: %s', 'minimalism'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
				<small><?php the_time(__('F jS, Y', 'minimalism')) ?> by <?php the_author() ?></small>

				<div class="entry">
					<?php the_content(__('Ver articulo completo &raquo;', 'minimalism')); ?>
				</div>

				<p class="postmetadata"><?php the_tags(__('Tags:', 'minimalism') . ' ', ', ', '<br />'); ?> <?php printf(__('Categoria %s', 'minimalism'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Editar', 'minimalism'), '', ' | '); ?>  <?php comments_popup_link(__('Sin comentarios »', 'minimalism'), __('1 Comentario »', 'minimalism'), __('% Comentarios »', 'minimalism'), '', __('Comentarios cerrados', 'minimalism') ); ?></p>
			</div>

		<?php endwhile; ?>

		<center><br />
         <?php wp_pagenavi(); ?></center>

	<?php else : ?>

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

	<?php endif; ?>

	</div>
 
Última edición:
Pegá el single.php que ahí va a estar el código de llamada del sidebar.


(Osea, pegá acá el código 😛)
 
Ene stos casos lo que hago es mirar de nuevo el theme original, del cual me base o alguna copia antigua, me la juego a que puede ser un simple error "boludo" en el código. Evidentemente el sidebar.php esta bien, el sidebar en el post carga, verifica si tenes alguna diferencia entre index.php y single.php.
No se si me explique.
 
Hola:

Al final de archivo index.php pega esto:

<?php get_sidebar();?>

<?php get_footer();?>

Un saludo.

Enviado desde mi GT-I9100 usando Tapatalk 2
 
Hola:

Al final de archivo index.php pega esto:

<?php get_sidebar();?>

<?php get_footer();?>

Un saludo.

Enviado desde mi GT-I9100 usando Tapatalk 2

Ya tiene esas funciones. Debe haber algo abierto, lo único raro que encontré (por lo poco que sé) es un CENTER abierto, no se si influirá.
 
Tal vez fue algún <script> que metiste, publicidad, analytics etc, por que si vez el source code de tu web, no se cierra el </body> ni el </html> o sea no esta cargando el footer y eso pasa muchas veces por que hay un JS mal puesto, publicidad, analytics etc
 

Por lo poco que sé, los index.php de los temas en Wordpress no se cierran con /body ni /html, simplemente llaman a las partes con un "get_".
 
Por lo poco que sé, los index.php de los temas en Wordpress no se cierran con /body ni /html, simplemente llaman a las partes con un "get_".

Claro llama al footer y el footer tiene el </body> si hay algo mal no sale, aunque en este caso puede ser que haya algo mal en el index que afecte la llamada, ya que en el single si sale.

Si vez el source code sale en rojo :encouragement:
 
Creo que encontré el problema.
Desactivá el Plugin WP-PageNavi y contame.
 
Hola master, el footer tampoco te carga.

Vamos a probar una cosita.

Proba poniendo el get_sidebar y el get_footer despues del get_header... entra en tu pagina y fijate si te cargan, no hagas caso a como se vea y avisame. :encouragement:

Master ! me cargo! hay q ordenarlo nomas !

Creo que encontré el problema.
Desactivá el Plugin WP-PageNavi y contame.

No tengo ese plungin !

Pegá el single.php que ahí va a estar el código de llamada del sidebar.


(Osea, pegá acá el código 😛)

Single.php

Insertar CODE, HTML o PHP:
<?php get_header(); ?>

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

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

		<div class="navigation">
			<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
			<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
		</div>

		<div class="post" id="post-<?php the_ID(); ?>">
			<h2><?php the_title(); ?></h2>
			<?php printf(__('Articulo guardado en: %4$s.', 'minimalism'), $time_since, get_the_time(__('l, F jS, Y', 'minimalism')), get_the_time(), get_the_category_list(', ')); ?>
<br/>-----------------------------------------------------------<br/><script type="text/javascript"><!--
google_ad_client = "ca-pub-0855216545024079";
/* pelissincortesBLANCO2 */
google_ad_slot = "3543167099";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br/><br/><br/>
<div class="entry">


				<?php the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'minimalism') . '</p>'); ?>

<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FNovedades-KB%2F208372619194089&amp;width=292&amp;colorscheme=light&amp;show_faces=false&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>

<center><script type="text/javascript"><!--
google_ad_client = "ca-pub-0855216545024079";
/* pelissincortesBLANCO2 */
google_ad_slot = "3543167099";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>

				<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'minimalism') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
				<?php the_tags( '<p>' . __('Tags:', 'minimalism') . ' ', ', ', '</p>'); ?>

				<p class="postmetadata alt">
					<small>
						<?php /* This is commented, because it requires a little adjusting sometimes.
							You'll need to download this plugin, and follow the instructions:
							http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
							/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); $time_since = sprintf(__('%s ago', 'minimalism'), time_since($entry_datetime)); */ ?>
						<?php printf(__('This entry was posted  %1$s on %2$s at %3$s.', 'minimalism'), $time_since, get_the_time(__('l, F jS, Y', 'minimalism')), get_the_time(), get_the_category_list(', ')); ?>
						<?php printf(__("You can follow any responses to this entry through the <a href='%s'>RSS 2.0</a> feed.", "kubrick"), get_post_comments_feed_link()); ?>

						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// Both Comments and Pings are open ?>
							<?php printf(__('You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'minimalism'), trackback_url(false)); ?>

						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// Only Pings are Open ?>
							<?php printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'minimalism'), trackback_url(false)); ?>

						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// Comments are open, Pings are not ?>
							<?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'minimalism'); ?>

						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// Neither Comments, nor Pings are open ?>
							<?php _e('Both comments and pings are currently closed.', 'minimalism'); ?>

						<?php } edit_post_link(__('Edit this entry', 'minimalism'),'','.'); ?>

					</small>
				</p>

			</div>
		</div>

	<?php comments_template(); ?>

	<?php endwhile; else: ?>

		<p><?php _e('Sorry, no posts matched your criteria.', 'minimalism'); ?></p>

<?php endif; ?>

	</div>
<?php get_sidebar(); ?>

<?php get_footer(); ?>
 
Reemplaza todo el Index.php por este y contame:

Insertar CODE, HTML o PHP:
<?php get_header(); ?>
	<center><h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1></center>
<div id="content" class="narrowcolumn">

	<?php if (have_posts()) : ?>

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

			<div class="post" id="post-<?php the_ID(); ?>">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Video: %s', 'minimalism'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
				<small><?php the_time(__('F jS, Y', 'minimalism')) ?> by <?php the_author() ?></small>

				<div class="entry">
					<?php the_content(__('Ver articulo completo &raquo;', 'minimalism')); ?>
				</div>

				<p class="postmetadata"><?php the_tags(__('Tags:', 'minimalism') . ' ', ', ', '<br />'); ?> <?php printf(__('Categoria %s', 'minimalism'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Editar', 'minimalism'), '', ' | '); ?>  <?php comments_popup_link(__('Sin comentarios »', 'minimalism'), __('1 Comentario »', 'minimalism'), __('% Comentarios »', 'minimalism'), '', __('Comentarios cerrados', 'minimalism') ); ?></p>
			</div>

		<?php endwhile; ?>

		<center><br />

       <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
                                        <div class="nav-next"><?php next_posts_link(__('&larr; Entradas Antiguas', 'framework')) ?></div>
                                        <div class="nav-prev"><?php previous_posts_link(__('Entradas Nuevas &rarr;', 'framework')) ?></div>
                                    <?php } ?>

</center>

	<?php else : ?>

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

	<?php endif; ?>

	</div>
<?php get_sidebar(); ?>

<?php get_footer(); ?>
 
un lujo maquina .. donde estaba el error ???

 
un lujo maquina .. donde estaba el error ???

Aca estaba el error:

Insertar CODE, HTML o PHP:
<center><br /><?php wp_pagenavi(); ?></center>

Al no tener el plugin WP_PageNavi daba error y se trababa ahi la carga de la página, no llegaba a la carga del Sidebar y el Footer.

Lo reparé asi:

Insertar CODE, HTML o PHP:
<center><br />

       <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
                                        <div class="nav-next"><?php next_posts_link(__('← Entradas Antiguas', 'framework')) ?></div>
                                        <div class="nav-prev"><?php previous_posts_link(__('Entradas Nuevas →', 'framework')) ?></div>
                                    <?php } ?>
</center>

De esta manera si existe el plugin lo usa, y sino aparece como lo configuré ahi que es lo común.

Me alegro haberte ayudado! :encouragement:

Saludos!

PD: También cerré un CENTER que estaba abierto, no creo que haya tenido mucha relevancia.