• User Attivo •

    Voglio inserirlo tramite codice, magari mettendo un codice solo per il primo articolo, e poi fare un codice dal primo al quinto solo titolo.


  • Super User •

    Beh allora basta un pò di HTML. Tipo

    < a href="urldeltuopost"> Nome del tuo post < /a >

    Senza spazi ovviamente. E per l'immagine:

    <img class="alignleft" src="urlimmagine" alt="" />

    Puoi scrivere il tutto dall'editor e poi incollarlo in widget di testo. Ma lo devi fare a mano tu ogni volta.


  • User Attivo •

    ora ho questo ma c'è qualcosa che non va, come posso correggerlo
    grazie

    [HTML]
    <?php query_posts('order=DESC&posts_per_page=7&cat=4'); ?>
    <?php query_posts('order=DESC&posts_per_page=7&cat=4'); ?><a href="<?php the_permalink() ?><?php the_post_thumbnail(); ?><?php the_content( __( 'Read more', 'redline' ) . ' »' ); ?><div class="clearfix"></div>
    <?php while (have_posts()) : the_post(); ?>
    <?php if(function_exists("UTW_ShowTagsForCurrentPost")) : ?>
    <div class="post_tag">
    <?php UTW_ShowTagsForCurrentPost("commalist", array('last'=>' and %taglink%', 'first'=>'Tagged in %taglink%',)) ?>
    </div>
    <?php endif; ?>
    <li>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php echo strip_tags(get_the_title()); ?><?php the_post_thumbnail(); ?>" class=""sidebar_link>
    <?php the_title(); ?>
    </li></a>
    <?php endwhile; ?></a>[/HTML]


  • User Attivo •

    Prova questo, lo uso nel mio blog:

    <?php query_posts('showposts=5'); ?>
    <?php while ( have_posts() ) : the_post(); ?> 
    <li>
    <div>
    <?php if(has_post_thumbnail()) { the_post_thumbnail( array(40,40) );
    } ?>
    </div>
    <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4><br />
    <span><?php the_time('d F Y'); ?> postato da <?php the_author(); ?></span>
    </li>
    <?php endwhile; ?>
    

  • User Attivo •

    ok cosi va bene ora devo creare un codice dove si vede la foto solo del primo articolo, cosi come mi consigli si vedono i titoli e va bene, ma mi serve la foto del prim


  • User Attivo •

    ho visto che c'è il link della foto, ma non me lo da, ti copio il codice della index, forse lo indica in maniera diversa, perchè esce tutto tranne la foto

    [HTML]<?php
    /**

    • Template: Index.php
    • @package RedLine
    • @subpackage Template
      */
      get_header();
      ?>
      <!--BEGIN #primary .hfeed-->
      <div id="primary" class="hfeed" role="main">
      <?php if ( have_posts() ) : ?>
      <?php while ( have_posts() ) : the_post(); ?>
      <!--BEGIN .hentry-->
      <article id="post-<?php the_ID(); ?>"><div class="<?php semantic_entries(); ?>">
      <header class="post-title"><h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e( 'Permanent Link to' ,'redline' );?> <?php the_title(); ?>"><?php the_title(); ?></a></h2></header>
      <!--BEGIN .entry-meta .entry-header-->
      <section class="meta-header"><div class="entry-meta entry-header">
      <span class="published"> <abbr class="published-time" title="<?php the_time( get_option( 'date_format' ) .' - '. get_option( 'time_format' ) ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></abbr></span> | <?php _e( 'Author:', 'redline' );?>
      <span class="author vcard"> <?php printf( '<a class="url fn" href="' . get_author_posts_url( $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( __( 'View all posts by %s', 'redline' ), $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></span>
      <?php edit_post_link( __( 'edit', 'redline' ), '<span class="edit-post">[', ']</span>' ); ?>
      </div></section><!--END .entry-meta .entry-header-->
      <!--BEGIN .entry-content-->
      <div class="entry-content">
      <?php the_post_thumbnail(); ?><?php the_content( __( 'Read more', 'redline' ) . ' »' ); ?><div class="clearfix"></div>
      <?php wp_link_pages( array( 'before' => '<div id="page-links"><p><strong>' . __( 'Pages:', 'redline' ) . '</strong> ', 'after' => '</p></div>', 'next_or_number' => 'number' ) ); ?>
      </div><!--END .entry-content-->
      <!--BEGIN .entry-meta .entry-footer-->
      <section class="meta-footer"><div class="entry-meta entry-footer">
      <span class="entry-categories"><?php _e( 'Posted in', 'redline' );?> <?php echo framework_get_terms( 'cats' ); ?></span>
      <span class="meta-sep">|</span>
      <span class="comment-count"><a href="<?php comments_link(); ?>"><?php comments_number( __( 'Leave a Comment', 'redline' ), __( '1 Comment', 'redline' ), __( '% Comments', 'redline' ) ); ?></a></span>
      </div></section><!--END .entry-meta .entry-footer-->
      </div></article><!--END .hentry-->
      <?php endwhile; ?>
      <?php get_template_part( 'navigation' ) ?>
      <?php else : ?>
      <!--BEGIN #post-0-->
      <div id="post-0" class="<?php semantic_entries(); ?>">
      <h2 class="entry-title"><?php _e( 'Not Found', 'redline' );?></h2>
      <!--BEGIN .entry-content-->
      <div class="entry-content">
      <p><?php _e( "Sorry, but you are looking for something that isn't here.", 'redline' );?></p>
      <?php get_search_form(); ?>
      <!--END .entry-content-->
      </div>
      <!--END #post-0-->
      </div>
      <?php endif; ?>
      </div><!--END .hfeed-->
      <?php get_sidebar(); ?>
      <?php get_footer(); ?>[/HTML]

  • User Attivo •

    Help chi mi aiuta


  • User Attivo •

    Aiuto, qualcuno mi da na mano.


  • User Attivo •

    Con il codice che ti ho postato si vede anche la miniatura dei post, lo puoi vedere in opera nel blog che ho in firma.
    Per far vedere solo la prima thumb non saprei.


  • User Attivo •

    c'è qualche errore da qualche parte, hai visto il codice che ho postato? Mandami proprio il tuo codice, elimino tutto e inserisco solo il tuo.

    Scusami, penso che il problema è proprio quella miniatura, che io non ho, l'immagine più piccola che ho è 150, quella non va proprio


  • User Attivo •

    L'ultimo codice che hai postato tu riguarda l'index.php, il mio va inserito nella sidebar.


  • User Attivo •

    Il tuo l'ho copiato uguale e non esce.


  • User Attivo •

    Hai supporto thumbnails in functions.php?
    Che tema stai usando?


  • User Attivo •

    Redline


  • User Attivo •

    Prova ad inserire in sidebar.php dopo la riga:

    <div id="secondary" class="aside" role="complementary">
    

    il codice seguente:

    <h3 class="widget-title"><?php _e( 'Ultimi post', 'redline' );?></h3>
    <ul>
    <?php query_posts('showposts=5'); ?>
    <?php while ( have_posts() ) : the_post(); ?> 
    <li>
    <div class="thumbpost">
    <?php if(has_post_thumbnail()) { the_post_thumbnail(  array(40,40) );
    } ?>
    </div>
    <h4 class="alignleft"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4><br />
    <span class="minitxt"><?php the_time('d F Y'); ?> postato da <?php the_author(); ?></span>
    </li>
    <?php endwhile; ?>
    </ul>
    

    Naturalmente dovrai mettere a posto il css.


  • User Attivo •

    Niente la foto non la richiama proprio


  • User Attivo •

    La foto deve essere un immagine in evidenza.


  • User Attivo •

    Grazieee va alla grande.....
    ti devo fare una statua


  • User Attivo •

    Di nulla 🙂
    Fammi sapere per la statua quand'è pronta...la metto in giardino 😄


  • User Attivo •

    Allora attendo le dimensioni......
    dovevo mettere l'evidenza, in ogni caso volendo non mettere l'evidenza (ma la foto normale), si può inserire la foto?