Support Forum

Is there any way to adjust the max number of characters for topic titles?

22 Answers

New Answer

IK Ike
Ike
Member

Hey Jim,

Yes it’s in there..

Allow for the admin to set the maximum length of a topic title – $maxTitleLength – with max size of 200 added to the $addTopicForm array at the top of spForumView templates.

For reference

JI jim
jim
Member

Ahh… sorry, I was expecting an SP Admin Option. Guess I need to edit another template for my child theme. Thanks for the pointer @ike – I’ll report back here if I have any trouble implementing this.

KV kvr28
kvr28
Member

Ike said
Hey Jim,

Yes it’s in there..

Allow for the admin to set the maximum length of a topic title – $maxTitleLength – with max size of 200 added to the $addTopicForm array at the top of spForumView templates.

For reference

Ike, this would have to be in the child theme correct?

YS Yellow Swordfish
Yellow Swordfish
Member

To save losing it in future then yes – the child theme. Copy the appropriate template into the same position in the child theme and it will be used in place of the parent version.

JI jim
jim
Member

kvr28 said
….this would have to be in the child theme correct?

Only if you have a modified copy of spForumView*.php in you Child Theme templates folder(s).

*Desktop and/or Mobile

This works for us (to limit count to 100 char.), when added to the array:

$addTopicForm = array(
‘tagClass’                =>   ‘spForm’,
‘maxTitleLength’      =>   100,
etc…

@Ike Please correct me if I’m wrong. And FYI: That For Reference link throws a 404…
For reference

IK Ike
Ike
Member

Thanks jim, that’s spot on wink

I think that link existed before we merged the Codex with the site.. Although possibly not. Either way it was a reference to theme template changes for 5.5.6 so outdated.. It’s all on this page now.