Announcement

Collapse
No announcement yet.

Basic SEO Improvements for User Profile page

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

  • [Official - Free] Basic SEO Improvements for User Profile page

    You may have seen the following from "HTML Improvements" in the Search Console for Google Webmasters tool.

    1. Duplicate meta descriptions
    2. Short meta descriptions
    3. Duplicate title tags

    Most (if not all) of them pertain to the User Profile page. By default, vB5 only uses "User Profile" as the page title and meta description. Since each forum member has its own user profile page, all of those pages have the same title and description which is not good for SEO.

    To fix this issue, it will require editing the "header" template in Style Manager in AdminCP.

    Find this code inside the <title></title> tag (note: the actual code may change in the future):

    Code:
    You need to be logged in to view the code. Login or Register now!
    and replace it with this code:

    Code:
    You need to be logged in to view the code. Login or Register now!
    As you notice, the original 'vb:if' condition is now converted into an 'vb:elseif' condition. See the 2 changes in blue. Note that the original code for the 'vb:if' condition may change in the future. So whatever the current code is, you should keep it and just convert it into an 'vb:elseif' condition.

    The page ID, which is color red in the code above, is the page id for the User Profile page. It may be different on your forum. To find it, go to any user profile page and then view the the HTML source by right-clicking on an empty space and choosing "View page source" (or equivalent). Search for "pageid" and you will see the corresponding id for your forum. Use that and replace the number 8 in the code.

    You may also want to change the text I used. For page title I used "User Profile for [username]". For meta description, I used "[username] is a member of vBMods.rocks community". Change the text accordingly.

    Note: Since this edits an existing vB template, these changes may introduce template merge conflicts every time you upgrade. You need to resolve those conflicts in AdminCP after upgrading.
    Last edited by glennrocksvb; 08-04-2017, 11:23 AM. Reason: Fixed code

  • #2
    Great... thank you!!!

    PS: Just tried it.. does not change anything

    Comment


    • William
      William commented
      Editing a comment
      Same here. I reverted the header template back to default after noticing the same thing. At least in vb 5.3.2 it doesn't appear to work.

    • NumNum
      NumNum commented
      Editing a comment
      shining are you running 5.3.2 as well?

    • shining
      shining commented
      Editing a comment
      Yes, I do

  • #3
    Hmm, this mod is applied here and it's working but I'm still using 5.3.1.

    I need to take a look at your setup to see what's wrong with the code.

    Comment


  • #4
    You need to be logged in to view the quote. Login or Register now!
    Is the mod still installed on your forum? Could you post the entire <vb:if> <vb:elseif> </vb:if> block containing the replacement code? Maybe you replaced the code incorrectly.

    Comment


    • shining
      shining commented
      Editing a comment
      Maximum number of characters exceeded. It cannot be more than 10000 characters. The current number of characters is 32173

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Do not post the entire template code. Just the <vb:if> <vb:elseif> </vb:if> block containing the replacement code I suggested to use in the first post.

    • William
      William commented
      Editing a comment
      I have the code currently inputted. Here's the meta information though:

      <meta name="twitter:card" content="summary"/>
      <meta name="twitter:site" content="@WChristForums"/>
      <meta name="twitter:creator" content="@WChristForums"/>
      <meta property="og:url" content="https://www.christforums.org/member/1-william"/>
      <meta property="og:title" content="User Profile - Christforums"/>
      <meta property="og:description" content="User Profile"/>
      <meta name="fb:app_id" content="626127990883163"/>
      <meta property="og:image" content="https://www.christforums.org/cf.jpg"/>

  • #5
    You need to be logged in to view the quote. Login or Register now!
    Ups... I only read "entire code"

    Here you are:

    Code:
    You need to be logged in to view the code. Login or Register now!

    Comment


    • shining
      shining commented
      Editing a comment
      Yes, checked that several times... "pageid": "8", and in body tag also class="l-desktop page8 vb-page view-mode"

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Did you modify the header template in the correct theme/style? Just making sure...

    • shining
      shining commented
      Editing a comment
      yes

  • #6
    Ok I finally saw what's wrong with the code.

    Code:
    You need to be logged in to view the code. Login or Register now!
    I basically moved my code up to be the first if-condition. Let me know if this fixes the issue so I can update the instructions in the first post.

    Comment


    • shining
      shining commented
      Editing a comment
      Now it works

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Thanks for confirmation.

  • #7
    FYI, first post updated with the fix.

    Comment


    • #8
      This is wonderful, thanks!

      Comment


      • #9
        i will check it at any time

        Comment

        Working...
        X