• User

    Si, certo, fatto. Ho provato con due temi differenti.. non funziona su entrambi. :gtsad:


  • User Attivo

    Non riesco a spiegarmelo.
    Ad ogni modo per tagliare la testa al toro puoi eliminare completamente la stampa dell'articolo - che si effettua con the_post() - e lasciare stampare il solo titolo - con la funzione the_title().

    Sarebbe utile se postassi qui il tuo file categories.php


  • User

    Questo ad esempio è il file categories.php creato dal tema di default:

    <?php get_header(); ?>
    
        <div id="content" class="narrowcolumn">
    
        <?php if (have_posts()) : ?>
    
            <?php while (have_posts()) : the_excerpt(); ?>
    
                <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
                    <small><?php the_time(__('F jS, Y', 'kubrick')) ?> <!-- by <?php the_author() ?> --></small>
    
                    <div class="entry">
                        <?php the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
                    </div>
    
                    <p class="postmetadata"><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', '<br />'); ?> <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?></p>
                </div>
    
            <?php endwhile; ?>
    
            <div class="navigation">
                <div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')) ?></div>
                <div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')) ?></div>
            </div>
    
        <?php else : ?>
    
            <h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
            <p class="center"><?php _e('Sorry, but you are looking for something that isn?t here.', 'kubrick'); ?></p>
            <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
        <?php endif; ?>
    
        </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    

  • User Attivo

    @korg74 said:

    Questo ad esempio è il file categories.php creato dal tema di default:

    ><?php get_header(); ?>
    
        <div id="content" class="narrowcolumn">
    
        <?php if (have_posts()) : ?>
    
            <?php while (have_posts()) : the_excerpt(); ?>
    
                <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
                    <small><?php the_time(__('F jS, Y', 'kubrick')) ?> <!-- by <?php the_author() ?> --></small>
    
                    <div class="entry">
                        <?php the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
                    </div>
    
                    <p class="postmetadata"><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', '<br />'); ?> <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?></p>
                </div>
    
            <?php endwhile; ?>
    
            <div class="navigation">
                <div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')) ?></div>
                <div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')) ?></div>
            </div>
    
        <?php else : ?>
    
            <h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
            <p class="center"><?php _e('Sorry, but you are looking for something that isn?t here.', 'kubrick'); ?></p>
            <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
        <?php endif; ?>
    
        </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    >```
    
    Prova a sostituire, alla quattordicesima riga,
    
    

    <?php the_content(__('Read the rest of this entry »', 'kubrick')); ?>

    
    con
    
    

    <?php the_excerpt(); ?>


  • User

    Provato. Nulla di fatto, tutto come prima.


  • User Attivo

    Ancora un'ultima cosa: prova a cambiare il nome del file da categories.php a category.php


  • User

    Dunque, facendo così, cliccando sulla categoria, vedo pagina bianca.


  • User Attivo

    Ok allora il problema era il nome del file. Ci voleva category.php e non categories.php.

    A questo punto devi correggere il loop ```
    <?php while (have_posts()) : the_post(); ?>

    
    Così dovrebbe andare.

  • User

    Quindi basterebbe copiare la index.php e rimonilarla category.php?
    Ho provato sia così, sia a correggere il vecchio files.. ma vedo pagina bianca!

    Grazie per la pazienza!


  • User Attivo

    Rifaccio il percorso all'indietro:

    basterebbe copiare index.php, rinominarla category.php e all'interno del loop mettere the_excerpt().

    Ho quindi sbagliato scrivendo categories.php anziché category.php e nel farti sostituire the_post() anziché the_content().

    Adesso però se hai fatto tutto correttamente dovrebbe proprio funzionare...


  • User Attivo

    Tra l'altro ieri ho effettuato un test su un mio sito, e ha funzionato perfettamente (libriefilm.com😞 le categorie mostrano i soli titoli dei contenuti, e ho fatto esattamente come ti ho scritto nel post precedente.


  • User

    Complimenti innanzitutto per il sito!

    Questo è il codice:

    <?php get_header(); ?>
    
        <div id="content" class="narrowcolumn">
    
        <?php if (have_posts()) : ?>
    
            <?php while (have_posts()) : the_excerpt(); ?>
    
                <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
                    <small><?php the_time(__('F jS, Y', 'kubrick')) ?> <!-- by <?php the_author() ?> --></small>
    
                    <div class="entry">
                        <?php the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
                    </div>
    
                    <p class="postmetadata"><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', '<br />'); ?> <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments &#187;', 'kubrick'), __('1 Comment &#187;', 'kubrick'), __('% Comments &#187;', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?></p>
                </div>
    
            <?php endwhile; ?>
    
            <div class="navigation">
                <div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')) ?></div>
                <div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')) ?></div>
            </div>
    
        <?php else : ?>
    
            <h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
            <p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'kubrick'); ?></p>
            <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
        <?php endif; ?>
    
        </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    

    Continuo a non vedere nulla, al contrario del tuo.


  • User Attivo
    1. Alla riga 7 sostituisci excerpt con post

    2. Alla riga 14 sostituisci the content con the excerpt come da precedente messaggio

    3. Chiama il file category.php

    4. upload


  • User

    Niente, impiega molto tempo per la chiamata.. e poi pagina bianca!


  • User Attivo

    Senti, tagliamo la testa al toro.

    Dai un'occhiata al mio blog huginn e muninn; vedi se trovi un tema grafico che ti possa andare bene. Nel caso, dimmi quale; faccio le modifiche al template, lo provo e te lo invio. Poi vedi se funziona regolarmente sul tuo sito; nel caso puoi studiarti il codice e adattarlo in futuro ad altri temi grafici.


  • User

    Grazie davvero.
    Proviamo con Daleri Selection


  • User Attivo

    Ok, prova a vedere se funziona. Lo trovi qui.


  • User

    Errore 404 - Pagina non trovata!


  • User Attivo

    Non ho capito... non funziona niente o solo il file category?


  • User Attivo

    Scusa il link corretto è questo.