Do not remember me!
/ / / How to remove specific categories when addnews by group?

How to remove specific categories when addnews by group?

I want to remove specific categories when add news in main page and if possible remove specific categories for different usergroups, can I do that? Added by: in jQuery Questions on
Open /templates/your-theme/addnews.tpl, on top add this jquery
<script type="text/javascript">
$(document).ready(function(){
$("#category option[value=10],#category option[value=30],#category option[value=99]").remove();
});
</script>

Specify category ID: #category option[value=X] where "X" is your category ID, use comma to separate multiple categories, example:
#category option[value=10],#category option[value=30],#category option[value=99]


If you are using jQuery "Chosen" then use this code instead
<script type="text/javascript">
$(document).ready(function(){
$("#category_chzn_o_10,#category_chzn_o_30,#category_chzn_o_99").remove();
});
</script>

Specify category ID: #category_chzn_o_X where "X" is your category ID, use comma to separate multiple categories, example:
#category_chzn_o_10,#category_chzn_o_30,#category_chzn_o_99

You can specify [group] and [not-group] to wrap around the jquery cod above for different usergroups Answered by: dlefaq


+9

Comments 1

  1. dlefaq
    +1
    dlefaq Currently Offline → 13 February 2015 00:41

    // This comment contains correct answer for this question
    == Removed and added to topic answer above ==
    // This comment contains correct answer for this question
     2 |  102

Information

Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.