Default a taxonomy term in CRED

Select a taxonomy term as default for all posts when submitting a CRED form with jQuery code.

jQuery( document ).ready(function() {
    jQuery('#category').hide();
    jQuery('#category select option[value="5"]').attr("selected",true);
});

You should wrap the taxonomy shortcode with any HTML element, containing the ID you need:

<span id="category">[[cred_field field="category" display="select" single_select="true"]]</span>

Let us know if this snippet is not working for you:

This snippet doesn’t work
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments