I made a custom post type in wordpress which takes extra values like $price, for example. I can save them a开发者_开发问答nd recall them in the back-end, but how can I display them on my new single-post.php page?
At http://codex.wordpress.org/Post_Types appears:
In the form of the single-type-template. In the same way that posts are shown on their own page with single.php, custom post types will use single-{posttype}.php if it's available.
So for the above example, you could create a single-acme_product.php file and the product posts would be shown using that template.
This means that you can create a new single template file with the name of you new custom type and display there the specific data for custom type, example:
single-post_with_price.php
精彩评论