Browse code

기본 기능 구현

Nepirity Corp authored on25/03/2018 09:20:13
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,30 @@
1
+<?php get_header(); ?>
2
+<div id="primary">
3
+    <div id="content" role="main">
4
+     <?php $mypost = array( 'post_type' => 'my_stories', );
5
+      $loop = new WP_Query( $mypost ); ?>
6
+
7
+      <?php while ( $loop->have_posts() ) : $loop->the_post();?>
8
+          <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
9
+              <header class="entry-header">
10
+                 <div style="float: top; margin: 10px">
11
+                    <?php the_post_thumbnail( array( 100, 100 ) ); ?>
12
+                 </div>
13
+
14
+                 <strong>Title: </strong><?php the_title(); ?><br />
15
+                 <strong>Memo: </strong>
16
+                 <?php echo esc_html( get_post_meta( get_the_ID(), 'story_memo', true ) ); ?>
17
+                 <br />
18
+                <strong>Rating: </strong>
19
+                <?= intval( get_post_meta( get_the_ID(), 'story_rating', true ) ); ?>
20
+              </header>
21
+              <div class="entry-content">
22
+                   <?php the_content(); ?>
23
+              </div>
24
+              <hr/>
25
+         </article>
26
+   <?php endwhile;  ?>
27
+   </div>
28
+</div>
29
+<?php wp_reset_query(); ?>
30
+<?php get_footer(); ?>