Forums

Admin-only parts of layout (4 posts)

  1. riddlu
    Member
    Posted 6 years ago #

    I'm interested in code allowing me to hide specific content of page when I'm unlogged user or logged, but not an admin.

    I'm porting my old layout from Jogger.pl to stand-alone blog. I just miss <ADMIN_BLOCK></ADMIN_BLOCK> and <LOGGED_USER_BLOCK>, <NOUSER_BLOCK> template tags.

    Is there any way to put some if() in template, that will enable me to, for example
    show my email only to me and logged users
    show disclaimer to new (unlogged) users
    etc.

  2. MichaelH
    Volunteer
    Posted 6 years ago #

    You could password protect pages and give that password to users. You could also consider using the register user only plugin from Carthik: http://carthik.net/blog/vault/2004/07/04/plugin-registered-users-only/

  3. moshu
    Member
    Posted 6 years ago #

    @riddlu,
    Did your try a search for admin only?

  4. riddlu
    Member
    Posted 6 years ago #

    moshu: Thanks, that'll help with admin.
    MichaelH: Well, I'm interested in sth like moshu adviced. Not full pages, unfortunately. I'll try to modify that code.

    Thanks guys for help; my first steps to wordpress. :)

Topic Closed

This topic has been closed to new replies.

About this Topic