Can’t get specific post to display using get_post
-
I’m trying to pull the excerpt of a post and stick it in the sidebar. It contains the client’s contact info, so it should be up there on every page. I’m using code I found in the codex, but it’s not populating. I’m new to php, so I have no idea what I’m missing. Here’s the code:
<div id="the-basics"> <p><?php $my_id = 79; $post_id_79 = get_post($my_id); $title = $post_id_79->post_excerpt; ?></p> </div> <!-- end the-basics div -->
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Can’t get specific post to display using get_post’ is closed to new replies.