Announcement

Collapse
No announcement yet.

How to change the title and meta description in vbulletin 5 forum for User Profile and other pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change the title and meta description in vbulletin 5 forum for User Profile and other pages

    Okay here it is and before I start remember that you can do it for various pages on your vbulletin 5 forum like blogs, memberlist, calender, social group, articles etc.. you just need to know the page ids.

    Now go to your theme's header through Style >> edit templates then find <title> </title> in header template
    and replace with the below code:
    Code:
    <title>
        <vb:if condition="$page['pageid'] == 8">
            {vb:set profile_title, 'Profile of '}
            {vb:strcat profile_title, {vb:var page.username}}
            {vb:raw profile_title} -
            {vb:set profile_desc, {vb:var page.username}}
            {vb:strcat profile_desc, ' is a member of Navodit Kumar Forums. Visit this profile for more details on their activities, basic information and more..'}
            {vb:set page.metadescription, {vb:raw profile_desc}}
        <vb:elseif condition="$page['channelid'] != $nodeid AND !empty($conversationStarter) AND isset($conversationStarter['htmltitle']) AND !empty($conversationStarter['htmltitle'])" />
            {vb:raw conversationStarter.htmltitle} -
        <vb:elseif condition="isset($page['title'])" />
            <vb:if condition="!empty($page['titleprefix'])"> {vb:raw page.titleprefix} -  </vb:if>
            {vb:var page.title} - <vb:comment>We have a page, not a channel. We don't allow html in page titles at the moment.</vb:comment>    
        </vb:if>
        {vb:var vboptions.bbtitle}
    </title>
    That's all, and make sure you have it open the page source of old page before this edit, so you can see the difference.
    Last edited by Wonder Woman; 03-23-2022, 04:24 PM.
    Similar Threads
Working...
X