1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Hide content for guests and show a message

Discussion in 'XenForo Questions and Support' started by Betclever, Jun 29, 2015.

  1. Betclever

    Betclever Active Member

    Hello all,

    Is it any add-on to hide content for guests and show a message like "Please register to view this post"?

  2. Amaury

    Amaury Well-Known Member

    Try using this conditional. It's what we used to hide the content within code tags to guests:

    <xen:if is="{$visitor.user_id}">Content to hide here</xen:if>
  3. Betclever

    Betclever Active Member

    Where must I paste this code please?
  4. Amaury

    Amaury Well-Known Member

    In the relevant template. In this case, it's likely the post template.
  5. Betclever

    Betclever Active Member

    I put your code in the template "post" but it doesn't work.
    Are you sure I have to put your code under the template "post"?
  6. C.Stanley

    C.Stanley Active Member

    Easy way to kill your seo.
    tajhay likes this.
  7. Mike Cowles

    Mike Cowles Member

Share This Page