Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have one wordpress theme which contain Custom Post Type.

And in my theme I can add that as a page which show some different URL.

Now when I call a WP function (is_page('some-page')) for wordpress page so this code is working.

Now for my Custom page I write that same code but it's not working.

So my question is how can we call this kind of specific custome page in wordpress.

share|improve this question

migrated from stackoverflow.com Sep 22 '12 at 22:44

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

Please check Wordpress theme hierarchy and you will know which file you need to create for custom post types :-)

http://codex.wordpress.org/File:Template_Hierarchy.png

Most likely you are after archive-$posttype.php

share|improve this answer
    
Thanks for your replay, This is exactly what I want thanks a lot. –  wasim kazi Sep 19 '12 at 10:08
    
try get_post_type( $post->ID ) == "[YOUR POST TYPE]" –  Merca Sep 19 '12 at 10:11
    
is_single is work in my case –  wasim kazi Sep 19 '12 at 10:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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