WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] first post different (3 posts)

  1. blueyez
    Member
    Posted 6 years ago #

    hi there
    i have customized css gallery theme (css/psd)

    now i want to make the first post to be big !
    eg: 400x200 insteat of 200x100
    so my latest post will have twice normal size. ( fist post listed on the index.php )

    i have normal post version:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php $values = get_post_custom_values("url"); echo $values[0]; ?>" title="<?php the_title(); ?>" target="_blank">
    <img src="<?php $values = get_post_custom_values("thumbs"); echo $values[0]; ?>" alt="<?php the_title(); ?>" /></a>
    <?php endwhile; ?>
    <?php endif; ?>

    on top of this code i want to put the customized post.
    made the css and all this stuff, all i need is the correct code.

  2. blueyez
    Member
    Posted 6 years ago #

    and i answer :)
    merged fron here

    <?php if (have_posts()) : ?>
    <?php query_posts("showposts=1"); ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <!--Title Tags-->
    <div class="post"><div class="image_left"></div>
    <h1 id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
    <!--End Title Tags-->
    
    <!--Content Tags-->
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <!-- End Content Tags-->
    
    <?php endwhile; ?>
    
    <?php query_posts("showposts&offset=1");?>
    <?php while (have_posts()) : the_post(); ?>
    
    <!--Title Tags-->
    <div class="post">
    <h1 id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
    <!--End Title Tags-->
    
    <!--Content Tags-->
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <!-- End Content Tags-->
    
    <?php endwhile; ?>
    
    <?php else: ?>
    Oh no, there aren't any posts!
    <?php endif; ?>
  3. dijon
    Member
    Posted 6 years ago #

    I found this post through a search and it has the answer I was looking for... Thanks blueyez!

Topic Closed

This topic has been closed to new replies.

About this Topic