• Witam, ostatnio przepisałem szablon HTML do szablonu WordPress.

    Każdy wpis wygląda tak samo w pętli na stronie głównej (tytuł, autor, data, link edycji, miniaturka, treść skrócona, link czytaj dalej).

    Chciałbym by przypięty post miał tylko Tytuł, treść pełną i link do edycji.

    W jaki sposób mogę tego dokonać? O to zawartość pliku index.php

    <?php get_header(); ?>
    
    <div id="templatemo_content_container">
    <div id="templatemo_content">
    <div id="templatemo_content_left">
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
                     <div class="templatemo_post_wrapper">
                    <div class="templatemo_post">
                        <div class="post_title">
                   	<?php the_title(); ?></div>
    
                   	 <div class="post_info">
                        	Autor: <i><?php the_author(); ?></i> (<?php the_time('d.m.Y'); ?>) <?php edit_post_link(); ?></div>
                        <div class="post_body">
    <?php the_post_thumbnail( 'large' ); ?>
    <?php the_excerpt(); ?>
    
    <a href="<?php the_permalink() ?>">Czytaj dalej</a><br>&nbsp;
    
                      </div>
    
                    </div>
                    </div> <!-- End of a post-->
    
    <?php endwhile; else: ?>
    <p><?php _e('Przepraszamy, brak wpisów.'); ?></p>
    <?php endif; ?>
    
                    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Strona roboczo znajduje się pod adresem: http://galeria6na9.fabryka-www.eu/

Viewing 2 replies - 1 through 2 (of 2 total)
  • >> http://codex.wordpress.org/Function_Reference/is_sticky

    <?php get_header(); ?>
    
    <div id="templatemo_content_container">
    <div id="templatemo_content">
    <div id="templatemo_content_left">
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
                     <div class="templatemo_post_wrapper">
                    <div class="templatemo_post">
                        <div class="post_title">
                   	<?php the_title(); ?></div>
    <?php if( is_sticky() ) : ?>
                        <div class="post_body">
    <?php the_content(); ?>
    <?php else: ?>
                   	 <div class="post_info">
                        	Autor: <i><?php the_author(); ?></i> (<?php the_time('d.m.Y'); ?>) <?php edit_post_link(); ?></div>
                        <div class="post_body">
    <?php the_post_thumbnail( 'large' ); ?>
    <?php the_excerpt(); ?>
    <?php endif; >
    
    <a href="<?php the_permalink() ?>">Czytaj dalej</a><br>&nbsp;
    
                      </div>
    
                    </div>
                    </div> <!-- End of a post-->
    
    <?php endwhile; else: ?>
    <p><?php _e('Przepraszamy, brak wpisów.'); ?></p>
    <?php endif; ?>
    
                    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Dziękuję kolego. Była literówka w kodzie ale już jest OK.
    Zamierzony efekt osiągnięty.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Temat ‘Inny wygląd postu przypiętego niż pozostałych w pętli’ jest zamknięty na nowe odpowiedzi.