MULTIMEDIA, Video digital, Grabación, Diseño gráfico, Diseño web, Programación > Webmasters - Diseño Web - Programación - Diseño gráfico

miniaturas entradas en plantillas wordpress

(1/2) > >>

dmacias:
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

Liamngls:
¿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

dmacias:
Creo que te vas a reir menos cuando veas esto  :mrgreen: :mrgreen:

index.php

--- Código: ---<?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(); ?>

--- Fin del código ---

page.php

--- Código: ---<?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(); ?>

--- Fin del código ---

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


Liamngls:
Ese index.php no es lo que esperaba ...


--- Código: ---   
            /* Run the loop to output the posts.
--- Fin del código ---

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

dmacias:

--- Cita de: Liamngls en 08 de Octubre de 2010, 12:06:22 pm ---Ese index.php no es lo que esperaba ...


--- Código: ---   
            /* Run the loop to output the posts.
--- Fin del código ---

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

--- Fin de la cita ---

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: ---<?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 printf( esc_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 printf( esc_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_src( get_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 > 1 ) : 
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; ?>

--- Fin del código ---

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

Navegación

[0] Índice de Mensajes

[#] Página Siguiente

Ir a la versión completa