Skip Navigation

[Résolu] Custom field with select > custom post ID

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 4 réponses, has 2 voix.

Last updated by Daniel Il y a 8 années et 1 mois.

Assigned support staff: Caridad.

Auteur
Publications
#163188

Hello,

is there a way to create a custom field from where I can select from all posts (title shown) of a custom post type?
I'm looking for a solution to display the title and link of a product page connected to the current product.

Regards,
Daniel

#163359

Dear Daniel,

You can set Pages to be a parent of the Product custom post type. This way you get to select a Page for each Product.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#176552

I've set products to be child of the parent product. But how can I display the title and url of the parent product?

#176812

Dear Daniel,

Using the id attribute, like this:

[wpv-post-title id="$parent_product"]

You have to replace parent_product with the slug of your parent custom post type.

The documentation is over here:

https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#176856

Perfect, missed that in the documentation.
Thanks for your help!