Support Forum

Hiding add topic button when viewing a topic?

BO boborg
boborg
Member

I think I did some sort of hack on v.4 to remove the add topic button when users are reading a topic since I often find they are using add topic when replying to a topic.

How do I do hide Add Topic in V.5?

7 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

V5 is template driven so you will need to address this in the spTopicView.php template in the SP theme you are using. You can use the Theme Editor for this. Open it up and find the call that displays the add topic button (sp_PostNewTopicButton) and comment it out or remove it.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)

BO boborg
boborg
Member

Hi and thanks for the answer.

I have followed the guide regarding custom theme. But upon activation I get this error

call_user_func_array() expects parameter 1 to be a valid callback, function ‘spmytheme_textdomain’ not found or invalid function name in /problem-with-post-edit-buttonome/digitalt/public_html/wp-includes/plugin.php

I think I have done exactly as described.

YS Yellow Swordfish
Yellow Swordfish
Member

Looks like in the spFunctions,.php file you have used a function name of ‘spmytheme_textdomain’ in the text domain setup but haven’t named the function below it with the same name.

BO boborg
boborg
Member

Yes just also had to make a renamed mytheme version of the language file inside forum-language/sp-themes/

Maybe you should also include this element in the guide http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

YS Yellow Swordfish
Yellow Swordfish
Member

Good thinking. I will update that. Thanks.