Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 07:44 am EST

Geeklog Forums

CUSTOM_siteHeader ?


Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
How would I create a CUSTOM_siteHeader? Is it possible?

I remember reading about it, however, have forgotten and can't find the topic. From what I understand, if I copy the existing COM_siteHeader from lib-common.php and paste that into function.php in the layout/themename folder and rename it to THEMENAME_siteHeader, that should work, right?
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
"Use the source, Luke" Wink

In function COM_siteHeader in lib-common.php, you'll find:
Text Formatted Code
    // If the theme implemented this for us then call their version instead.

    $function = $_CONF['theme'] . '_siteHeader';

    if( function_exists( $function ))
    {
        return $function( $what );
    }
 

And yes, your function should go into your theme's functions.php

bye, Dirk
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
Hmm... I used function XSilver_siteHeader( $what = 'menu' ) (just testing with XSilver) and get page cannot be displayed... Neutral

[edit]
nm, i figured it out. i removed the code that you pasted above from my copied function.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
as always, thanks again Dirk.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

All times are EST. The time is now 07:44 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content