Add specific post to a specif html div tag
-
Hi! I am sorry if this post is obvious to someone but I just started to learn a bit of PHP and WordPress. I am planing to convert static html to WordPress. Since trying to learn basics, I wolud like to strat by solving this problem. I don’t know how to add let say post with id=7 to div that I customize in css file. I thought that it would be enough just to put inside div this:
<div><?php $post_7 = get_post(7); $title = $post_7->post_title; ?></div>
But nothing happened.
Thank you in advance!
- The topic ‘Add specific post to a specif html div tag’ is closed to new replies.