Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Changing header name in topic view (adding )
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Jun 15, 2012 - 2:50 am

Hello,

I'm try to make a small change to the topic view page, I'd like to add a <H1> tag to the header name that displays the topic title.

I've found that sp_TopicHeaderName function seems to take care of that.  I just wanted to know the proper way to include my changes: basically adding <H1></H1> tags around the topic name.

Thank you.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 15, 2012 - 5:52 am

Using H1 tags is not really the best way.

You should define a new class in your forum theme CSS file that can emulate the H1 tags (if you wish) and then pass that new class as a tagClass argument to the spHeaderName() function. In all of our supplied themes the tagClass is passed as 'spHeaderName' so all you would need to do is replace this class name with your new one.

And if that is all in a custom theme - as it should be - then it is safe from future updates from us.

andy-signature.png
YELLOW
SWORDFISH
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Jun 15, 2012 - 8:21 am

Thanks, I'll have a look at that.

I want <H1> for SEO reasons, it's probably good to have the topic name this way in addition to the page TITLE...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jun 15, 2012 - 10:47 am

for best seo, you should only have 1 H1 tag... multiple could have undesired consequences...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626