Skip Navigation

[Resolved] Additional text before/iside a taxonomy

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by tomaszT 6 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#602820

Hello, I am working on Woocommerce bookshop single product page. I would like to show there an author, year of publication etc. as taxonomies. I would like to place before each taxonomy a custom name of the group, e.g. Author: John Smith. I would like to show those only when a taxonomy is checked/filled. I hope there is a way to add something inside the shortcode: {!{wpv-post-taxonomy type="autor"}!} but I still do not know how to obtain my purpose.
In the other words: I would like not to show a phrase "Author:" with an empty space when no author is chosen.

#602901

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand - you would like to display taxonomy label Author only when authors are available otherwise do not dispaly the Author title - correct?

If yes: I need problem URL and access details where I can fix this issue for you.

*** 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.

#602939

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I edit your content template and added the code as given under in your divi module (Text mode) and saved the content template using divi builder:

<div id="my_author">Author: {!{wpv-post-taxonomy type="autor"}!}</div>

And then I clicked on the link "Stop using Divi Builder for this Content Template" and switched to normal content template and added following code to JS box:

jQuery(document).ready(function($){
   $("#my_author:has(a)").show();
});

And now as you can see - with following link - no "Author:" text is displayed as post do not have author:
=> hidden link

With following link it displays the "Author:" with taxonomy name as post has author assigned:
=> hidden link

#602941

Thank you Minesh, it is exactly what I wanted to obtain. I hope I will be able to do the same with other taxonomies.