Hide 'Create Topic' on home page?

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?

Try this CSS Rule

body:not([class*='category-']) #create-topic {
    display: none;
}

It will only let the create-topic button appear on category pages.

Yes cpradio, absolutely perfect, top notch support.

many thanks.

actually, can the code be tweeked to show the ‘create topic’ button also in category>subcategory>tag?

Just to confirm, you have show filter by tag enabled?

i do indeed have it enabled.

so when someone goes to service(category)>county(subcategory)>town(tag) the create topic button is shown.

K, this is what you will want then

body:not([class*='category-']) #create-topic {
    display: none;
}

body.tags-page #create-topic {
    display: block;
}

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.

:+1:

Merci aussi de ma part @cpradio, ce serait génial en tant que fonctionnalité.
Malheureusement, cela ne fonctionne pas sur les appareils mobiles :pensive:

J’ai tout essayé, mais je ne comprends pas comment masquer « Créer un sujet » sur les appareils mobiles.
Sur les petits écrans, il est difficile de naviguer dans les catégories et les tags ; cette #feature serait d’une grande aide. Pourquoi ne pas ajouter une option dans le menu ? :smiley:

Vous pouvez utiliser l’inspecteur de style de votre navigateur. Il montre que la déclaration est écrasée par une déclaration plus spécifique sur mobile :

Vous pouvez donc soit utiliser vous-même la déclaration plus spécifique pour mobile :

body:not([class*="category-"]) .list-controls .container #create-topic {
    display: none;
}

Ou donner la priorité à votre déclaration générale avec la propriété !important :

body:not([class*="category-"]) #create-topic {
    display: none !important;
}

Merci @manuel, j’ai utilisé la propriété !important et cela fonctionne parfaitement !