0

i need to attach an image from a specific post by using post id of custom post type which i created new... how can i..? actually i created a new 5 post type named 'flips'... and meta content areas are website, title back, content back, main title, thumbnail etc.,.

<?php $mypost = get_post(28); echo apply_filters('the_content',$mypost->post_content); ?>
<?php $mypost = get_post(28);
echo apply_filters('website',$mypost->website);
echo apply_filters('titleback',$mypost->titleback);
echo apply_filters('contentback',$mypost->contentback);
?>

i need to add post thumbnail to display here also how can i?

0

You can use get_the_post_thumbnail like this:

<?php $mypost = get_post(28); echo apply_filters('the_content',$mypost->post_content); ?>
<?php $mypost = get_post(28);
echo apply_filters('website',$mypost->website);
echo apply_filters('titleback',$mypost->titleback);
echo apply_filters('contentback',$mypost->contentback);

echo get_the_post_thumbnail( $mypost->ID, 'thumbnail');

?>
| improve this answer | |
0

thnx alot.., and i got another good method for this.., but there face a problem that ,how can is show contents of the newly created custom meta content add area sections in my custom post type named 'flips',
here i craeted new 3 sections to add more contents, that are, website, titleback, contentback, shows in above my quistion also..,

'flips','p' => 28 ) );?> have_posts() ) : $loop->the_post(); ?> .... ....here i need contents of newly added meta content arears... ....

help me plss.., also suggest me any other better code for this..? help me plss..sir.,

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.