Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Opzione numero caratteri

    Ciao a tutti ho un blog, ma ho un problema con una parte di un codice php! In quanto vorrei mettere un limite di righe all' articolo che si legge nella pagina principale, che cosa c' è di sbagliato?
    codice:
    <?php
    get_header();
    ?>
    <?php global $options; // This code retrieves all our Palmixio options. ?>
    <?php foreach ($options as $value) {
    if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); }
    } ?>
    <div id="main"> 
      
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <div class="main-content">
        <div class="postbackground">
          <div class="datebackground">
            <span class="datejm">
              <?php the_time('j M'); ?>
            </span>
            <span class="datey">
              <?php the_time('y'); ?>
            </span>
          </div>
          <div class="postmetadata">
            <p class="background-postmetadata">
            <?php if ( function_exists('the_tags') ) : ?>
              <?php the_tags('Tags: ',', ','.'); ?>
            <?php endif; ?>   
            
    
            <span style="border-top:1px solid #dedede;">
              <?php _e('Scritto da:') ?> 
              <?php the_author_posts_link(); ?>,
               <?php if ( comments_open() ) : ?>
              <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
            <?php endif; ?> </span>
            </p>
            <?php if ( function_exists('wp_link_pages') ) : ?>
          <div class="background-link-pages"><?php wp_link_pages(); ?></div> 
              <?php endif; ?>
          </div>
          <div class="post" id="post-<?php the_ID(); ?>"> 
            <div class="posttitle">
              <div class="tlbackgroundtitle">
              </div>
              <div class="trbackgroundtitle">
              </div><h2>
                <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
                  <?php the_title(); ?></a></h2>
              <div class="blbackgroundtitle">
              </div>
              <div class="brbackgroundtitle">
              </div>
            </div>
            <div class="entry">
              
    
    
                <?php edit_post_link(__('Edit This')); ?>
              </p>
    <?php global $wp_version;
    if ( version_compare( substr($wp_version, 0, 3), '2.9', '>=') && $pxio_thumb == '2' ) {
    //2.9+ stuff here
    if( has_post_thumbnail() && $pxio_thumb_pages !== 'false') {
    if ($pxio_align_thumbnail == '1') { 
    if($pxio_border_pages_t !== 'false') { 
    $myalign = "class=alignleft  mybgthumbnail";
    } elseif($pxio_border_pages_t === 'false') {  
    $myalign = "class=alignleft";
    }
    } elseif ($pxio_align_thumbnail == '2') {
    if($pxio_border_pages_t !== 'false') { 
    $myalign = "class=alignright  mybgthumbnail";
    } elseif($pxio_border_pages_t === 'false') {  
    $myalign = "class=alignright";
    }
    } elseif ($pxio_align_thumbnail == '3') {
    if($pxio_border_pages_t !== 'false') { 
    $myalign = "class=aligncenter  mybgthumbnail";
    } elseif($pxio_border_pages_t === 'false') {  
    $myalign = "class=aligncenter";
    }
    }
    if($pxio_thumb_size_pages == '1') { the_post_thumbnail('thumbnail', $myalign);} 
    elseif($pxio_thumb_size_pages == '2') { the_post_thumbnail('medium', $myalign);} 
    elseif($pxio_thumb_size_pages == '3') { the_post_thumbnail('full', $myalign);} 
    } 
    } 
    if ($pxio_excerpt_content == '1' || $pxio_excerpt_content === "false") {
    the_content('.. continue reading ..');
    } 
    elseif ($pxio_excerpt_content == '2') {
    global $more; $more = -1;
    the_excerpt();
    $more = 0;
    }?>
            </div>
            <p class="fsize">
              <?php _e("Categoria:"); ?>
              <?php the_category(',') ?></p>
            <?php comments_template('', true); ?>
    
    
    
          </div> 
        </div> 
        
    
    
      </div>
      <?php endwhile; else: ?>
      <p id="sorry">
    
        <?php _e('Sorry, no posts matched your criteria.'); ?>
      </p>
      <?php endif; ?>
      <div class="navigationpost">
        
        <?php posts_nav_link(' - ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>
      </div> 
      
    </div> 
    
    <?php
    get_sidebar();
    ?>
    <?php get_footer(); ?>
    C' è nessuno che mi può aiutare?

  2. #2

  3. #3

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.