Skip Navigation

[Resolved] Show popular taxonomy terms by default.

This support ticket is created 6 years, 4 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
- 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 replies, has 2 voices.

Last updated by davidS-53 6 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#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!