Function to display title and content of another post
-
I thought this code should work but it doesn’t display either the post title or the contents. (I am using the Executable php widget to display content of a post in the sidebar)
<?php $my_id = 324; $post_id_324 = get_post($my_id); $title = $post_id_324->post_title; $content =$post_id_324->post_content; echo($title); echo($content); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Function to display title and content of another post’ is closed to new replies.