Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

make taxamony term shown in categories option at this plugin WordPress

  • SOLVED

hi
I am recently downloaded a plugin called: "User Submitted Posts"
Allowing users to publish content on the web site.
i want to do some modification at this plugin code:

1. instead of showing post's categories in the option menu, display the taxonomy (called 'groups') terms.

2. add the taxonomy terms automatically to the terms list

I hope it was clear enough..

Answers (2)

2013-10-08

phppoet answers:

Open submission-form.php file from views folder and find below code between line 58 and 65

<fieldset class="usp-category">
<label for="user-submitted-category"><?php _e('Post Category', 'usp'); ?></label>
<select name="user-submitted-category">
<?php foreach($usp_options['categories'] as $categoryId) { $category = get_category($categoryId); if(!$category) { continue; } ?>
<option value="<?php echo $categoryId; ?>"><?php $category = get_category($categoryId); echo htmlentities($category->name, ENT_QUOTES, 'UTF-8'); ?></option>
<?php } ?>
</select>
</fieldset>

replace above code with code given below

<fieldset class="usp-category">
<label for="user-submitted-category"><?php _e('Post Category', 'usp'); ?></label>
<select name="user-submitted-category">
<?php wp_dropdown_categories( 'tab_index=10&taxonomy=groups&hide_empty=0&hierarchical=true' ); ?>
</select>
</fieldset>

regards


net comments:

ok. it work fine! thank you!

is there a way to define auto check for the terms?
(now i have to check them every time i add a new term)


phppoet comments:

<blockquote>is there a way to define auto check for the terms?
(now i have to check them every time i add a new term)</blockquote>

sorry i didn't understand your question . Could you please make it more clear ?

regards


net comments:

when you add a new term it really appear in the category list and it work fine.
but in order to display those terms in the website i have to select which category will assigned to submitted posts.
Is there any way to make them be marked as a default?
hope it more clear now..


net comments:

now i see that categories list does not display on website, it just disappears!
i add picture to make it clear.