Protected Part of a Page

Discussion in 'HTML & Website Design' started by ArticleScholar, Dec 5, 2008.

  1. #1
    I've been searching the net for a tut on this but I can't find anything.

    Here's the scenario. I want to place something (a text widget) on the homepage of my wordpress blog that only registered users will be able to see. How am I going to accomplish that?
     
    ArticleScholar, Dec 5, 2008 IP
  2. ArticleScholar

    ArticleScholar Well-Known Member

    Messages:
    1,015
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    105
    #2
    Anybody? :)
     
    ArticleScholar, Dec 5, 2008 IP
  3. Justin M

    Justin M Active Member

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #3
    You could try something with php;

    <?php
    
    if(isset($_COOKIE["cookie"]))
     {
      include("widget.txt");
     }
    
    ?>
    PHP:
     
    Justin M, Dec 5, 2008 IP
  4. JMV290

    JMV290 Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'd suggest something similar to this and then including

    else echo "You must be logged in to access this content";
    PHP:
    or such. Maybe include a link to login and register. It might lead to a few registrations.
     
    JMV290, Dec 6, 2008 IP