Post by ID in separate divs
-
I’m going to have a single page with some divs, each of which are getting a post made specific for that div.
So far I got:
<div id="wc-1"> <div class="content"> <?php $my_id = 1; $post_id_1 = get_post($my_id); $title = $post_id_1->post_title; echo '<h1>' . $title . '</h1>'; ?> </div> </div> <div id="wc-2"> <div class="content"> <?php $my_id = 80; $post_id_1 = get_post($my_id); $title = $post_id_1->post_title; echo '<h1>' . $title . '</h1>'; ?> </div>
It does get the h1 title of course, but what I can’t figure out is how to retrieve the rest.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Post by ID in separate divs’ is closed to new replies.