0

I've created a custom post type named "image". Now my theme shows posts on homepage in three parameters- Fresh, Featured, Random(i'm feeling lucky). How can i add custom posts in there. here is the front-page file - front-page.php

1 Answer 1

0

To show custom post type on a page, try something like this

//place code to display the title here
if ( get_post_type( $post->ID ) == 'posttypename' ){
  //place code to display fields here
} else {
  //place code to display excerpt here
}
1
  • i want to show with other post. Not individually, and as per theme feature, i want to show it on fresh(new),featured(top voted), random(i'm feeling lucky). See the front-page.php
    – Prateek
    Commented May 16, 2013 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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