GSeven
Outubro 19, 2016, 11:46am
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)
Outubro 19, 2016, 11:56am
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
Outubro 19, 2016, 11:59am
3
Yes cpradio, absolutely perfect, top notch support.
many thanks.
GSeven
Outubro 19, 2016, 12:10pm
4
actually, can the code be tweeked to show the ‘create topic’ button also in category>subcategory>tag?
cpradio
(cpradio)
Outubro 19, 2016, 12:30pm
5
Just to confirm, you have show filter by tag enabled?
GSeven
Outubro 19, 2016, 12:33pm
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)
Outubro 19, 2016, 12:34pm
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
Outubro 19, 2016, 12:39pm
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)
Abril 7, 2021, 10:16am
9
Obrigado também da minha parte, @cpradio , seria ótimo como um recurso.
Infelizmente, não funciona em dispositivos móveis
mstm
(mstm)
Abril 7, 2021, 4:20pm
10
Já tentei de tudo, mas não entendo como ocultar o botão “Criar Tópico” em dispositivos móveis.
Com telas pequenas, é difícil navegar por categorias e tags; essa #feature ajudaria muito. Por que não adicionar uma opção ao menu?
manuel
(Manuel Kostka)
Abril 7, 2021, 5:03pm
11
Você pode usar o Inspecionador de Estilo do seu navegador. Ele mostra que a declaração é sobrescrita por uma mais específica no modo móvel:
Então, você pode usar a declaração mais específica para dispositivos móveis:
body:not([class*="category-"]) .list-controls .container #create-topic {
display: none;
}
Ou dar prioridade à sua declaração geral com a propriedade !important:
body:not([class*="category-"]) #create-topic {
display: none !important;
}
mstm
(mstm)
Abril 7, 2021, 5:23pm
12
Obrigado @manuel ! Usei a propriedade !important e funciona perfeitamente!