Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter TataVostru

    (@tatavostru)

    This is the code , i want to display only 5 post wath i want… not the last post … i want to display them like this:

    https://trailer-youtube.com/images/toptrailere.jpg

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="front_trai">
    <div class="fr">
    <div class="trai">
    <?php $homethumb = get_post_meta($post->ID,'homethumb', true);  ?><a href=" <?php the_permalink() ?>" rel="bookmark" title="<?php printf(__(' %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/<? echo strtolower($homethumb); ?>.jpg" width="95" height="140" alt="" title="<?php printf(__('%s', 'kubrick'), the_title_attribute('echo=0')); ?>" /></td>
    </div>
    <div class="trai_link">
        <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('%s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></td>
    </div>
    </div>
    </div>
    <?php endwhile; ?>
    <?php if ($prev_link || $next_link): ?>
    <div class="navigation">
    	<div class="alignleft"><?php echo $next_link; ?></div>
    	<div class="alignright"><?php echo $prev_link; ?></div>
    </div>
    <?php endif; ?>
    <?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 if(function_exists('get_search_form')) get_search_form(); ?>
    <?php endif; ?>
    esmi

    (@esmi)

    Try making your 5 chosen posts into sticky posts.

    MichaelH

    (@michaelh)

    Just guessing:
    change

    <?php if (have_posts()) : ?>

    to

    <?php query_posts($query_string . '&offset=1');?>
    <?php if (have_posts()) : ?>

    See
    query_posts()
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    Thread Starter TataVostru

    (@tatavostru)

    you have mistake the link ( :)?> ) … i make but nothing happened i am not an expert in php…pleas help:(

    MichaelH

    (@michaelh)

    Fixed!

    <?php query_posts($query_string . '&offset=1');?>
    <?php if (have_posts()) : ?>
    Thread Starter TataVostru

    (@tatavostru)

    i change but nothing happened… sugestion?

    MichaelH

    (@michaelh)

    Please paste all the code from the theme template file (probably index.php) that is displaying those posts into a pastebin such as wordpress.pastebin.ca, and report the link back here. Maybe someone can spot your problem. Thanks.

    Thread Starter TataVostru

    (@tatavostru)

    it works with the stiky post ..its ok but wen seting in
    Blog pages show at most 10 ( because i want in archive to display 10 post per page ….. on the front page will displayy too )……

    anny sugestion

    Thread Starter TataVostru

    (@tatavostru)

    The index look’s like this… i do not think here is the problem

    <?php get_header(); ?>
    <div class="art-contentLayout">
    <div class="art-content">
    
    <?php include (TEMPLATEPATH . '/rotatingpost.php'); ?><br />
    <?php include (TEMPLATEPATH . '/toptrailere.php'); ?>
    <?php include (TEMPLATEPATH . '/altestiri.php'); ?><br />
    <?php include (TEMPLATEPATH . '/boxoffice.php'); ?><br />
    <?php include (TEMPLATEPATH . '/stiri.php'); ?><br />
    
    </div>
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <div class="cleared"></div>
    
    <?php get_footer(); ?>

    Thread Starter TataVostru

    (@tatavostru)

    MichaelH

    (@michaelh)

    Confused by what you want so maybe

    <?php query_posts($query_string . '&post_per_page=5&offset=1');?>
    <?php if (have_posts()) : ?>

    But someone else might have a different suggestion.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘display only 6 post i want’ is closed to new replies.