We are rebuilding our website in Wordpress and are trying to figure out the best solution to display a different views of the same product with unique meta data.

For example, let's say that Property is the post type. We would like to display several different views (completed (built), for sale, and for rent.)

Each would have slightly different text and custom fields that display based on what the user is looking at with 3 different URL patterns:

  • example.com/homes-built/house1
  • example.com/homes-for-sale/house1
  • example.com/homes-for-rent/house1

A Property can fall into one or many different views - (both for sale and for rent for example.)

Ideally, we would have one post type and the views would display the information according to what view you are looking for (rather than duplicate the content and any translations 3 times). I know that this can be achieved with 3 separate custom post types, but is possible to do this with one while maintaining separate meta data for each view?

To complicate things we are using WPML for translation. This is one of the reasons why having one post type would be preferred. Would a plugin like Yoast still be able to apple unique meta data for the separate views?

2 Answers 2


For example, let's say that Property is the post type. We would like to display several different views (completed (built), for sale, and for rent.)

Sure. Just make Completed, For Sale, and For Rent taxonomies for the Property post type. Look into WP_Rewrite class, too, and you can get greater control over url permalink structure.


One possible solution is to add a metadata field to your post indicating the status (i.e. completed, for sale or for rent). Then in your template file you call get_post_meta and show the content depending on the status. An added bonus of this approach is that you’ll be able to generate post listings based on the status.

To add the metadata with plugins you could use Advanced Custom Fields to add a field “status” to your posts. If you want to do so programmatically, I can recommend an excellent video tutorial by Bobby.

Another solution, quite less elegant though, would be to use post formats (search the codex for post formats). In that case you would not need to add a custom metadata field. Note that wordpress does not allow to generate custom post formats, so you’ll have to map three of the nine predefined to the three possible statuses of your properties. A good video tutorial by Alessandro shows how to deal with post formats. By adopting this approach, you need to manually set the post format in your dashboard so the right template is rendered (e.g. aside => completed, gallery => for sale and link => for rent).

  • Hi Pisuke, Thank you for the message. I'm not sure if that will work in this situation as a property can be one or many post formats. For example, it can be both for sale and rent. My understand is that only one post format can be used at a time. Is that correct? Jun 14, 2017 at 12:45
  • Another idea I had was to have separate posts and somehow group or link them like WPML does with their translations. So on the custom post type you would see one line item for House 1 for example, and options to duplicate it for Sale, Rent, etc. And if possible with this setup, we would edit the "main post" and you would be able to push out any updates to description or features to all the linked posts. Is this even possible? Any plugins available that you know of to accomplish this? Jun 14, 2017 at 12:49
  • 1
    I believe the Advanced Custom Fields plugin can be a good solution to add the metadata you need. However, can't you just use a taxonomy 'status' with the three possibilities as terms and render html accordingly using has_term($term, $taxonomy, $post), you would then need a condition in the template file such as: if the user wants to see 'for sale and/or completed' and the post has such terms, then render needed html. Jun 14, 2017 at 21:43

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.