Important Note:  The contents of this document applies ONLY to version 5.x.x of Simple:Press.  It likely does NOT apply to version 6.x.x (our latest version).


sp_ForumTimeZone() – Displays the timezone of the forum as set in WordPress.


sp_ForumTimeZone($args=”, $label=”);


$args – List of arguments for controlling display.
(string) (optional)
‘tagClass’ => ‘spForumTimeZone’
‘echo’ => 1
‘get’ => 0

‘tagClass’: CSS Class for the TimeZone Display.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code.  One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation.  One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$label – Text displayed before timezone shown.
(string) (optional)

Special Notes

In standard supplied Simple:Press themes this is used in the footer (spFoot.php) of the forum pages but can be used elsewhere on a forum page.


Display the Forum Timezone using the default arguments and displaying the title as “Forum TimeZone:” .

sp_ForumTimeZone('tagClass=spForumTimeZone', __sp('Forum Timezone: '));

Actions and Hooks Used in Template Tag

  • apply_filters(‘sph_ForumTimeZone_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_ForumTimeZone’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.


Since Simple:Press version 5.0.

Codex page sync’d to code version 5.4.1.

Source Code

sp_ForumTimeZone() is located in simple-press/forum/content/sp-common-view-functions.php.

Posted in