Вывод поста на главную страницу
-
Здравствуйте. Помогите пожалуйста с постом на главной странице. Пост выводится как анонс, мне нужен полный текст на главной странице.
list-view.php
<?php global $post, $myThemes_inver; ?> <?php if( $myThemes_inver ){ $classes = 'row-fluid inverted-view'; } else{ $classes = 'row-fluid'; } $myThemes_inver = !$myThemes_inver; ?> <article <?php post_class( $classes ); ?>> <?php if( has_post_thumbnail() ) { ?> <div class="my-thumbnail span6"> <a>"> <?php the_post_thumbnail( 'full' ); ?> </a> </div> <?php } ?> <?php if( !empty( $post -> post_title ) ) { ?> <h3><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $post -> post_title ); ?>"><?php the_title(); ?></a></h3> <?php } else { ?> <h3><a href="<?php the_permalink(); ?>"><?php _e( 'Read more about ..' , 'myThemes' ) ?></a></h3> <?php } ?> <p><?php the_excerpt(); ?></p> <p class="actions"> <?php if ( comments_open() ){ $comments = get_comments_number( $post -> ID ); $link = get_comments_link( $post -> ID ); } else{ $comments = __( 'Closed' , 'myThemes' ); $link = get_permalink( $post -> ID ); } ?> <a href="<?php echo $link; ?>" class="button comments"> <i></i><span><?php echo $comments; ?></span> </a> <span class="like-<?php echo $post -> ID ?>"> <?php echo likes::get2( $post -> ID ); ?> </span> </p> <div class="clearfix"></div> </article>
loop.php
<div class="row-fluid"> <?php global $myThemes_inver; $myThemes_inver = true; $myThemes_layout = new layout( ); /* LEFT SIDEBAR */ $myThemes_layout -> echoSidebar( 'left' ); ?> <section class="<?php echo $myThemes_layout -> contentClass(); ?> list-view"> <?php if( have_posts() ){ while( have_posts() ){ the_post(); get_template_part( 'cfg/templates/view/list-view' ); } } else{ echo '<h3>' . __( 'Not found results' , 'myThemes' ) . '</h3>'; echo '<p>' . __( 'We apologize but this page, post or resource does not exist or can not be found. Perhaps it is necessary to change the call method to this page, post or resource.' , 'myThemes' ) . '</p>'; } get_template_part( 'cfg/templates/pagination' ); ?> </section> <?php /* LEFT SIDEBAR */ $myThemes_layout -> echoSidebar( 'right' ); ?> </div>
Просмотр 7 ответов — с 1 по 7 (всего 7)
Просмотр 7 ответов — с 1 по 7 (всего 7)
- Тема «Вывод поста на главную страницу» закрыта для новых ответов.