GSeven
2016 年 10 月 19 日午前 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)
2016 年 10 月 19 日午前 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
2016 年 10 月 19 日午前 11:59
3
Yes cpradio, absolutely perfect, top notch support.
many thanks.
GSeven
2016 年 10 月 19 日午後 12:10
4
actually, can the code be tweeked to show the ‘create topic’ button also in category>subcategory>tag?
cpradio
(cpradio)
2016 年 10 月 19 日午後 12:30
5
Just to confirm, you have show filter by tag enabled?
GSeven
2016 年 10 月 19 日午後 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)
2016 年 10 月 19 日午後 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
2016 年 10 月 19 日午後 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)
2021 年 4 月 7 日午前 10:16
9
@cpradio さんからもありがとうございます。その機能があれば素晴らしいですね。
残念ながら、モバイルデバイスでは動作しません
mstm
(mstm)
2021 年 4 月 7 日午後 4:20
10
「トピック作成」をモバイル端末で非表示にする方法がわかりません。画面が小さいとカテゴリやタグの閲覧が難しいため、この機能は非常に役立ちます。メニューにオプションを追加するのはどうでしょうか?
manuel
(Manuel Kostka)
2021 年 4 月 7 日午後 5:03
11
ブラウザのスタイルインスペクタを使用できます。モバイルでは、より具体的な宣言によって宣言が上書きされていることがわかります。
したがって、モバイル用に自分でより具体的な宣言を使用するか、
body:not([class*="category-"]) .list-controls .container #create-topic {
display: none;
}
または、!important プロパティを使用して一般的な宣言に優先順位を付けることができます。
body:not([class*="category-"]) #create-topic {
display: none !important;
}
mstm
(mstm)
2021 年 4 月 7 日午後 5:23
12
@manuel ありがとうございます。!important プロパティを使用したら、完璧に動作しました!