GSeven
10월 19, 2016, 11:46오전
1
Is it possible to hide the ‘create topic’ button on the home page?
i would like my users to navigate to the appropriate category/subcategory before posting a topic, because then the correct category option is automatically placed in the composer, instead of having to scroll through what will be hundreds of categories and subcategories in the drop down menu looking for the right one.
Does anybody know how to do this please?
cpradio
(cpradio)
10월 19, 2016, 11:56오전
2
Try this CSS Rule
body:not([class*='category-']) #create-topic {
display: none;
}
It will only let the create-topic button appear on category pages.
GSeven
10월 19, 2016, 11:59오전
3
Yes cpradio, absolutely perfect, top notch support.
many thanks.
GSeven
10월 19, 2016, 12:10오후
4
actually, can the code be tweeked to show the ‘create topic’ button also in category>subcategory>tag?
cpradio
(cpradio)
10월 19, 2016, 12:30오후
5
Just to confirm, you have show filter by tag enabled?
GSeven
10월 19, 2016, 12:33오후
6
i do indeed have it enabled.
so when someone goes to service(category)>county(subcategory)>town(tag) the create topic button is shown.
cpradio
(cpradio)
10월 19, 2016, 12:34오후
7
K, this is what you will want then
body:not([class*='category-']) #create-topic {
display: none;
}
body.tags-page #create-topic {
display: block;
}
GSeven
10월 19, 2016, 12:39오후
8
Yes, The ‘create topic’ button now shows up on the page when a tag is selected.
absolute genius. i love you guys.
This populates the composer with the correct category and the correct tag.
mstm
(mstm)
4월 7, 2021, 10:16오전
9
Thanks also from me @cpradio , it would be great as a feature.
Unfortunately it doesn’t work with mobile devices
mstm
(mstm)
4월 7, 2021, 4:20오후
10
다양한 방법을 시도해 보았지만, 모바일 기기에서 "주제 만들기"를 어떻게 숨길 수 있는지 이해하지 못하겠습니다.
작은 화면에서는 카테고리나 태그를 탐색하기가 어렵기 때문에, 이 Contribute > Feature 기능이 큰 도움이 될 것입니다. 메뉴에 옵션을 추가하는 건 어떨까요?
manuel
(Manuel Kostka)
4월 7, 2021, 5:03오후
11
You can use your browser’s Style Inspector. It shows that the declaration is overwritten by a more specific one on mobile:
So you can either use the more specific declaration for mobile yourself:
body:not([class*="category-"]) .list-controls .container #create-topic {
display: none;
}
Or give your general declaration priority with the !important property:
body:not([class*="category-"]) #create-topic {
display: none !important;
}
mstm
(mstm)
4월 7, 2021, 5:23오후
12
Thanks @manuel I used the !important property and it works perfectly!