Autor Tema: miniaturas entradas en plantillas wordpress  (Leído 9709 veces)

Desconectado dmacias

  • Member
  • ***
  • Mensajes: 171
miniaturas entradas en plantillas wordpress
« en: 07 de Octubre de 2010, 07:13:13 pm »
Ahora os doy yo la brasa con una plantilla que llevo ya tiempo probando y ajustando por aquí y por allí.

La cosa es que me he percatado que esta plantilla, en la página principal del blog hace miniaturas de las entradas, esactamente de las 5 primeras lineas, luego te pone Leer mas.

He estado mirando por todos los sitios que creo y no encuentro la forma de cambiarlo, no es configuración de wordpress que ya lo he comprobado, sino de la plantilla.

Si sabeis de algo en concreto que tengo que buscar pues ya sabeis, a decirlo, que por ahora voy filtrando por post-thumbail sin exito.

Esperemos que sea fácil de cambiar

Saludos por adelantado


Desconectado Liamngls

  • Moderador
  • ******
  • Mensajes: 15689
    • Manuales-e
Re: miniaturas entradas en plantillas wordpress
« Respuesta #1 en: 07 de Octubre de 2010, 07:46:42 pm »
¿Y si pegas el contenido de los archivos index.php y page.php?

Creo que sé como quitarlo pero no quiero tirarme a la piscina sin ver primero si está llena o vacía  :-6

Desconectado dmacias

  • Member
  • ***
  • Mensajes: 171
Re: miniaturas entradas en plantillas wordpress
« Respuesta #2 en: 07 de Octubre de 2010, 10:50:24 pm »
Creo que te vas a reir menos cuando veas esto  :mrgreen: :mrgreen:

index.php
Código: [Seleccionar]
<?php
/**
 * The main template file.
 *
 *
 * @package WordPress
 * @subpackage Obscure
 */

get_header(); ?>


<div id="container">
<div id="content" role="main">

<?php
/* Call the featured posts.
 */
 get_template_part( &#39;featured&#39; );

/* Run the loop to output the posts.
 * If you want to overload this in a child theme then include a file
 * called loop-index.php and that will be used instead.
 */
 get_template_part( &#39;loop&#39;, &#39;index&#39; );
?>

</div><!-- #content -->
</div><!-- #container -->

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

page.php
Código: [Seleccionar]
<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the wordpress construct of pages
 * and that other &#39;pages&#39; on your wordpress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Obscure
 */

get_header(); ?>


<div id="container">
<div id="content" role="main">
            <?php /* Display breadcrumb trail */ ?>
<div id="breadcrumb">
<?php include("breadcrumb.php"); ?>
</div><!-- #breadcrumb -->

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

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    <div class="entry-head clearfix">
                        <h2 class="entry-title"><?php the_title(); ?></h2>
                    </div>

<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( &#39;before&#39; => &#39;<div class="page-link">&#39; . __( &#39;Pages:&#39;, &#39;obscure&#39; ), &#39;after&#39; => &#39;</div>&#39; ) ); ?>
<?php edit_post_link__( &#39;Edit content &raquo;&#39;, &#39;obscure&#39; ), &#39;<span class="edit-link">&#39;, &#39;</span>&#39; ); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->

<?php endwhile; ?>

</div><!-- #content -->
</div><!-- #container -->

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

Si necesitas algo más dímelo

Por cierto, esta plantilla viene cargadita de regalos.

archive.php
sidebar.php
header.php
comments.php
single.php
404.php
function.php
footer.php
attachment.php
author.php
category.php
tag.php
index.php
search.php
breadcrumb.php
comment-form.php
featured.php
loop.php

sidebar-footer.php
timthumb.php
widgets.php

y ya los de siempre

style.css
style-ie.css

pero que he setoooooo   :-6 :-6 :ciego: :ciego:

si quieres alguno de ellos me lo pides



Desconectado Liamngls

  • Moderador
  • ******
  • Mensajes: 15689
    • Manuales-e
Re: miniaturas entradas en plantillas wordpress
« Respuesta #3 en: 08 de Octubre de 2010, 12:06:22 pm »
Ese index.php no es lo que esperaba ...

Código: [Seleccionar]
   
            /* Run the loop to output the posts.

Pon el loop.php a ver si está ahí.

Desconectado dmacias

  • Member
  • ***
  • Mensajes: 171
Re: miniaturas entradas en plantillas wordpress
« Respuesta #4 en: 08 de Octubre de 2010, 01:37:22 pm »
Ese index.php no es lo que esperaba ...

Código: [Seleccionar]
   
            /* Run the loop to output the posts.

Pon el loop.php a ver si está ahí.

Jajajaja, por eso dije que te ibas a reir menos jajajaja  :-6 :-6 yo también me quede  :blind: :blind:

vamos con el loop
Código: [Seleccionar]
<?php
/**
 * The loop that displays posts.
 *
 * The loop displays the posts and the post content.  See
 * http://codex.wordpress.org/The_Loop to understand it and
 * http://codex.wordpress.org/Template_Tags to understand
 * the tags used in it.
 *
 * @package WordPress
 * @subpackage Obscure
 */
?>


<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( &#39;Not Found&#39;, &#39;obscure&#39; ); ?></h1>
<div class="entry-content">
<p><?php _e( &#39;Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.&#39;, &#39;obscure&#39; ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>

<?php
/* Start the Loop.
 *
 * In Obscure we use the same loop in multiple contexts.
 * It is broken into three main parts: when we&#39;re displaying
 * posts that are in the gallery category, when we&#39;re displaying
 * posts in the asides category, and finally all other posts.
 *
 * Additionally, we sometimes check for whether we are on an
 * archive page, a search page, etc., allowing for small differences
 * in the loop on each template without actually duplicating
 * the rest of the loop that is shared.
 *
 * Without further ado, the loop:
 */ 
?>

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

<?php /* How to display posts in the Gallery category. */ ?>

<?php if ( in_category_x(&#39;gallery&#39;, &#39;gallery category slug&#39;, &#39;obscure&#39;) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printfesc_attr__( &#39;Permalink to %s&#39;, &#39;obscure&#39; ), the_title_attribute( &#39;echo=0&#39; ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

<div class="entry-meta">
<?php obscure_post_utility(); ?>
</div><!-- .entry-meta -->

<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<div class="gallery-thumb">
<?php
$images get_children( array( &#39;post_parent&#39; => $post->ID, &#39;post_type&#39; => &#39;attachment&#39;, &#39;post_mime_type&#39; => &#39;image&#39;, &#39;orderby&#39; => &#39;menu_order&#39;, &#39;order&#39; => &#39;ASC&#39;, &#39;numberposts&#39; => 999 ) );
$total_images count$images );
$image array_shift$images );
$image_img_tag wp_get_attachment_image$image->ID, &#39;thumbnail&#39; );
?>

<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag?></a>
</div><!-- .gallery-thumb -->
<p><em><?php printf__( &#39;This gallery contains <a %1$s>%2$s photos</a>.&#39;, &#39;obscure&#39; ),
&#39;href="&#39; . get_permalink() . &#39;" title="&#39; . sprintf( esc_attr__( &#39;Permalink to %s&#39;, &#39;obscure&#39; ), the_title_attribute( &#39;echo=0&#39; ) ) . &#39;" rel="bookmark"&#39;,
$total_images
); ?>
</em></p>

<?php the_excerpt( &#39;&#39; ); ?>
<?php endif; ?>
</div><!-- .entry-content -->

<div class="entry-utility">
<a href="<?php echo get_term_link_x(&#39;gallery&#39;, &#39;gallery category slug&#39;, &#39;obscure&#39;), &#39;category&#39; ); ?>" title="<?php esc_attr_e( &#39;View posts in the Gallery category&#39;, &#39;obscure&#39; ); ?>"><?php _e( &#39;More Galleries&#39;, &#39;obscure&#39; ); ?></a>
<span class="meta-sep">|</span>
<span class="comments-link"><?php comments_popup_link__( &#39;Leave a comment&#39;, &#39;obscure&#39; ), __( &#39;1 Comment&#39;, &#39;obscure&#39; ), __( &#39;% Comments&#39;, &#39;obscure&#39; ) ); ?></span>
<?php edit_post_link__( &#39;Edit&#39;, &#39;obscure&#39; ), &#39;<span class="meta-sep">|</span> <span class="edit-link">&#39;, &#39;</span>&#39; ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->

<?php /* How to display all other posts. */ ?>

<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <div class="entry-head clearfix">
                <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printfesc_attr__( &#39;Permalink to %s&#39;, &#39;obscure&#39; ), the_title_attribute( &#39;echo=0&#39; ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                <div class="entry-meta"><?php obscure_post_meta(); ?></div>
            </div><!-- .entry-head -->
           
<?php if ( is_home() || is_archive() || is_search() ) : // Only display excerpts with thumbnail for homepage or frontpage. ?>
    <div class="entry-summary">
            <?php if(has_post_thumbnail$post->ID )) :
$image wp_get_attachment_image_srcget_post_thumbnail_id$post->ID ), &#39;post-thumbnail&#39; );
?>

                <img class="alignleft" src="<?php bloginfo("template_directory"); ?>/timthumb.php?src=<?php echo $image[0]; ?>&w=150&h=150&zc=1" border="0" />
<?php 
endif;
the_excerpt__( &#39;Continue reading <span class="meta-nav">&rarr;</span>&#39;, &#39;obscure&#39; ) ); ?>

</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content__( &#39;Continue reading <span class="meta-nav">&rarr;</span>&#39;, &#39;obscure&#39; ) ); ?>
<?php wp_link_pages( array( &#39;before&#39; => &#39;<div class="page-link">&#39; . __( &#39;Pages:&#39;, &#39;obscure&#39; ), &#39;after&#39; => &#39;</div>&#39; ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>

<div class="entry-utility clearfix">
            <?php obscure_post_utility(); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->

<?php comments_template( &#39;&#39;, true ); ?>

<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>

<?php endwhile; // End the loop. Whew. ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages ) : 
if(function_exists(wp_pagenavi)) : wp_pagenavi(); else : ?>

<div id="nav-below" class="navigation clearfix">
<div class="nav-previous"><?php next_posts_link__( &#39;<span class="meta-nav">&larr;</span> Previous Entries&#39;, &#39;newspress&#39; ) ); ?></div>
<div class="nav-next"><?php previous_posts_link__( &#39;Next Entries <span class="meta-nav">&rarr;</span>&#39;, &#39;newspress&#39; ) ); ?></div>
</div><!-- #nav-below -->
<?php endif; endif; ?>

El tema de poner esta plantilla es que es casi idéntica a la que tengo, pero muy mejorada así casi no tengo que meterle yo la zarpa que lo estropeo todo

Desconectado Liamngls

  • Moderador
  • ******
  • Mensajes: 15689
    • Manuales-e
Re: miniaturas entradas en plantillas wordpress
« Respuesta #5 en: 08 de Octubre de 2010, 03:37:03 pm »
Vaya cosa más chunga ¿cuál es el tema?

Creo que bajando el tema acabaremos antes  :-6

Desconectado dmacias

  • Member
  • ***
  • Mensajes: 171
Re: miniaturas entradas en plantillas wordpress
« Respuesta #6 en: 08 de Octubre de 2010, 03:50:59 pm »
http://wpcrunchy.com/our-themes/obscure

Este es el tema, obscure (que no se entere dabo que luego me copia)  :burla: :burla:

Desconectado Liamngls

  • Moderador
  • ******
  • Mensajes: 15689
    • Manuales-e
Re: miniaturas entradas en plantillas wordpress
« Respuesta #7 en: 08 de Octubre de 2010, 10:41:07 pm »
Manda huevos, básicamente he encontrado la movida, lo que no tengo claro es donde tocar para eliminarlo. De momento te voy a ascender al primer puesto de movidas complicadas con Wordpress  :-6

Bueno básicamente la historia es que hay dos formas de hacer lo de "leer más"; la clásica de añadir la etiqueta individualmente en las entradas o desde el panel de admin configurando que todas las entradas salgan recortadas o con la etiqueta de sistema the_excerpt(), esta puñetera lo que hace es que solo se muestren los primeros 55 caracteres de cada entrada.

La cuestión debe de pasar por cambiar the_excerpt() por the_content() pero ¿en dónde?  :blind:

Yo probaría en el loop, encima de

Código: [Seleccionar]
<?php endif; ?>
Pero no sé si cambiar la etiqueta o agregarle un valor:

Código: [Seleccionar]
<?php the_excerpt( &#39;&#39; ); ?>
Sería cambiar excerpt con content o hacerlo así:

Código: [Seleccionar]
<?php the_excerpt( &#39;&#39;,FALSE,&#39;&#39; ); ?>
Si te aclaras mejor que yo con el inglés ...

http://codex.wordpress.org/Customizing_the_Read_More
http://codex.wordpress.org/Template_Tags/the_excerpt

 

Aviso Legal | Política de Privacidad | Política de Cookies

el contenido de la web se rige bajo licencia
Creative Commons License