0

I made a custom post type in wordpress which takes extra values like $price, for example. I can save them and recall them in the back-end, but how can I display them on my new single-post.php page?

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.