Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- </div>
- <div class="st3-title"><img src="<?php echo get_template_directory_uri(); ?>/images/banner-default.svg"></div>
- <div id="right-side">
- <div class="st3-entry">
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <!-- Conten fix -->
- <div class="book-container">
- <div class="book">
- <div class="stfic-cover">
- <div class="book-ridge"></div>
- <?php if ( has_post_thumbnail() ) { ?>
- <a href="<?php the_post_thumbnail_url(); ?>"><?php the_post_thumbnail(); ?></a>
- <?php
- } else { ?>
- <div class="book-defaultcv">
- <h4 style="text-transform:uppercase; margin-top:0px"><?php the_title(); ?></h3>
- <div class="st3-infoline" style="width:50%; margin: 0 auto;"></div>
- <em>
- <?php if ( get_post_meta($post->ID, $prefix . 'b_author', true ) ): ?>
- <?php echo esc_html( get_post_meta($post->ID, 'st_series_b_author', TRUE) ); ?>
- <?php else: ?>
- <?php the_author(); ?>
- <?php endif ?>
- </em>
- </div>
- <?php } ?>
- </div>
- <div class="book-info">
- <ul>
- <h3 style="text-transform:uppercase; margin-top:0px"><?php the_title(); ?></h3>
- <p><strong>• Tác giả: </strong><em>
- <?php if ( get_post_meta($post->ID, $prefix . 'b_author', true ) ): ?>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>index.php?s=<?php echo esc_html( get_post_meta( $post->ID, 'st_series_b_author', true ) ); ?>" style="color:green"> <?php echo esc_html( get_post_meta($post->ID, 'st_series_b_author', TRUE) ); ?> </a>
- <?php else: ?>
- <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" style="color:green"><?php the_author(); ?></a>
- <?php endif ?>
- </em></p>
- <p><strong>• Thể loại: </strong><em>
- <?php if( has_term( '', 'stfic-theloai' ) ) { echo the_terms( $post->ID, 'stfic-theloai', '', ' / ' ); }
- else
- echo 'Chưa xác định';
- ?>
- </em></p>
- <p><strong>• Series: </strong><em>
- <?php if( has_term( '', 'stfic-series' ) ) { echo the_terms( $post->ID, 'stfic-series' ); }
- else
- echo 'Chưa biết';
- ?>
- </em></p>
- <p><span><strong>• Đánh giá: </strong><?php echo csr_get_overall_rating_stars($post_id = 0); ?> (<?php echo csr_get_overall_rating ($post_id = 0); ?>)</span></p>
- <div class="st3-infoline"></div>
- <p><strong>• Trạng thái: </strong><em style="color:#9c979d"><?php echo esc_html( get_post_meta( get_the_ID(), 'st_series_b_status', true ) ); ?></em></p>
- <p><strong>• Mã sách: </strong><span id="textToCopy"><?php echo get_post_meta( get_the_ID(), 'bookcode', true ); ?></span>
- <button id="copyButton"><i class="fa fa-clipboard" aria-hidden="true" title="Nhấn vào đây để sao chép mã sách"></i></button>
- <span id="copyResult"></span>
- <script src="<?php echo get_template_directory_uri(); ?>/js/copytext.js"></script>
- </p>
- <?php
- $pgi = get_post_meta($post->ID, $prefix . 'b_warn', true);
- if(is_array($pgi)) {
- echo'<p><strong>• Cảnh báo</strong><span style="small"> <i class="fa fa-question-circle" style="color:#c6c4c9"></i></span></p>';
- foreach($pgi as $option['value']){ echo '<div class="book-rates"><img src="'.$option['value'].'"></div>';}
- }
- ?>
- </ul>
- </div>
- </div>
- <div class="vide"></div>
- <div class="st3-infoline"></div>
- <!--Social share-->
- <div class="st3-minishare" style="margin-top: 0"><?php st3_social_share() ?></div>
- </div>
- <!-- Content fix -->
- <h3><p>Sơ lược:</p></h3>
- <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
- <div class="spacer"></div>
- <div class="st3-editform"><?php edit_post_link('<i class="fa fa-pencil-square-o" style="color:#757378" title="Chỉnh sửa bài viết"></i>')?></div>
- <p><div class="st3-hori"></div></p>
- <!--Mục lục-->
- <div class="st3-toc">
- <h3 style="text-align:center"><p>MỤC LỤC:</p></h3>
- <?php
- $terms = get_the_terms( $post->ID , 'stfic-manuscripts' );
- if ( $terms != null ){
- foreach( $terms as $term ) {
- $termSlug = $term->slug;
- unset($term);
- }
- }
- ?>
- <?php
- $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
- echo $term->slug; // will show the slug
- $args = array(
- 'post_type' => 'stfic-child',
- 'posts_per_page' => -1,
- 'post_status' => 'publish',
- 'order' => 'ASC',
- 'post_parent' => 0,
- 'stfic-manuscripts' => $termSlug
- );
- $query = new WP_Query( $args );
- while ( $query->have_posts($post->ID) ) : $query->the_post();
- echo '<li><a href="'. get_permalink(). '">' .get_the_title() .'</a></li>';
- endwhile;
- wp_reset_query();
- ?>
- </div>
- <!--Mục lục-->
- <div class="st3-hori"></div>
- <div class="vide"></div><br \><br \>
- <?php comments_template( '/comments-rating.php', true ); ?>
- <?php endwhile; else: ?>
- <p><?php _e('Mones rất lấy làm tiếc, nhưng hiện tại ở đây có lẽ không có bài viết nào phù hợp với yêu cầu của bạn.'); ?></p>
- <?php endif; ?>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement