Skip Navigation

[Résolu] Show popular taxonomy terms by default.

This support ticket is created Il y a 5 années et 8 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

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

Last updated by davidS-53 Il y a 5 années et 8 mois.

Assisted by: Luo Yang.

Auteur
Publications
#1084092
2018-08-16 11_37_07-.png

I have a taxonomy "Medium" set up. Loving the ability to show popular terms by the way.

I would like to encourage users to select from existing popular terms first, rather than creating their own. This will encourage users to be consistent with them- hopefully avoiding ending up with "Printmaking" and "Print Making", for example.

Is it possible to have the Popular terms always visible, above the "Add" field? I've added a quick screenshot showing what I mean.

Hopefully that makes sense. Cheers!

#1084433

Hello,

I assume we are talking about Toolset form for creating/editing post.

If it is, there isn't exact feature, but you can display the exited terms as checkboxes field, and display an "Add New" link below those checkboxes field, for example taxonomy "Category":

	<div class="form-group">
		<label>Categories</label>
		[cred_field field='category' display='checkbox' output='bootstrap']
		[cred_field field='category_add_new' taxonomy='category' type='add_new']
	</div>

More help:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

#1084861
2018-08-17 10_17_44-Edit Post Form ‹ Open Studios — WordPress.png

Hi Luo, that sounds perfect. However, I get an error:

There is a problem with medium_add_new field. Please check CRED form.

I have attached screenshot of my code. Did I need to change anything elsewhere too?

#1084866

It just occurred to me that it's probably because my Medium taxonomy is set to flat... Is there a way to get around that? It doesn't make sense to have Medium hierarchical in this case.

Otherwise, could I convert it to hierarchical and remove the ability to add child terms somehow?

#1085428

You are right, the argument "display" works only for the hierarchical taxonomy, see our document:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
display. Optional. Used by fields for Hierarchical Taxonomies (like Categories) to signify the mode of display (ie. “select” or “checkbox”).

There isn't such a built-in feature for these:
remove the ability to add child terms of hierarchical taxonomy.

But for the flat taxonomy, you can use a little CSS codes to display the popular terms by default, for example wordpress built-in taxonomy "Tags", you can use below codes in your Toolset form, it will be able to display a input box, :
[cred_field field='post_tag' class='form-control' output='bootstrap']

click "CSS Editor", add below codes:

.shmpt-post_tag{
	display:block !important;
}

It will show the popular terms by default.

#1085432

Sounds fine to me- cheers!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.