I have a View where I display courses.
I have a Discount custom post type which is parent of Course.
Depending on which Discount post is parent of the current post, I want to display either the course's price field value, or the Discount's title (which is the discounted price).
How can I make this condition? How can I refer to this:
If parent Discount's title = "$24" then display parent Discount's title.
Hello. Thank you for contacting the Toolset support.
To include a field from the parent post, you would use the following shortcode:
[types field="xxxx" id="$yyyy"][/types]
Where:
"xxxx" is the field of the parent you want to show, and "yyyy" is the slug-name of the parent post. The “$” is required, as this represents a variable where the parent post name will be replaced by the post ID, internally.
I noticed that you placed extra ' ' around the types shortcode, but the GUI-generated conditional output code doesn't have those. Anyhow, even by adding those extra characters to the code, it still doesn't work.
Could you please send me problem URL as well as which view you are using?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
The topic ‘[Closed] Conditionally display parent's title’ is closed to new replies.