Support Forum

Modifying Simple:Press display start, moving to my theme

SP sptab
sptab
Member

First, I wanted again to thank you for the great forum software you are building with Simple:Press

 

I am trying to modify the start of the forum output around <!– Simple:Press display start –> in the HTML.

For now I am changing content/sp-template-control.php which isn’t convenient as it is erased by any SP5 upgrade.

I am not sure if there are any hook like SP4, is there a possibility to move my changes in my custom theme ?

 

Thank you.

6 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

It is really impossible to advise you unless you tell us what it is you are actually wanting to achieve…?

SP sptab
sptab
Member

Well the change I have made is about adding a <DIV> at the start of the forum output.

I have already done it in content/sp-template-control.php and it’s working fine, if possible I just want to move this change to the theme files, so I don’t touch SP5 core files.

YS Yellow Swordfish
Yellow Swordfish
Member

I think if you actually go and look at the theme templates you will pretty quickly see where you should be doing this. The template names are pretty obvious as well.
As always we recommend not editing a supplied theme but duplicating it and customising your own.

MP Mr Papa
Mr Papa
Member

and why would you modify the core template control file??  there are numerous hooks and filters in that very location that you can use…

and you can use the theme spFunctions.php file (as Andy says, start with your own theme) to add any special hook code that you want…

SP sptab
sptab
Member

I was already running on a copy of the default theme. I went for modifying the core code because I did not know about the spFunctions.php way of modifying the forum. Great news, thanks a lot for that wink

My SP5 forum is online since 4 days, no bug to report so far, thanks again guys.

MP Mr Papa
Mr Papa
Member

cool. thanks for the update…

SP uses hooks, actions and filters just like WP… and our theme functions file works just like the one in a wp theme…

we have started a series of codex pages (http://codex.simple-press.com) for 5.0 but its pretty barren currently… hoping to get it populated by release of 5.0… User contributions always welcome to the codex!!!