Title: Restrict Template Elements
Last modified: November 5, 2016

---

# Restrict Template Elements

 *  Resolved [michael_feh](https://wordpress.org/support/users/frontendhomie/)
 * (@frontendhomie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/restrict-template-elements/)
 * Is it also possible to hide Elements which lay directly in the template code?
   I have same links in the header which i only want to show to logged in users.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [michael_feh](https://wordpress.org/support/users/frontendhomie/)
 * (@frontendhomie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/restrict-template-elements/#post-8401039)
 * i figured it out myself:
    [https://developer.wordpress.org/reference/functions/is_user_logged_in/](https://developer.wordpress.org/reference/functions/is_user_logged_in/)
 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/restrict-template-elements/#post-8425070)
 * Great that you got it solved.
 * If you want to hide elements in your theme based on User Levels, you can also
   use:
 * `rua_has_user_level($user_id,$level_id)`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Restrict Template Elements’ is closed to new replies.

 * ![](https://ps.w.org/restrict-user-access/assets/icon-256x256.png?rev=1815922)
 * [Restrict User Access - Ultimate Membership & Content Protection](https://wordpress.org/plugins/restrict-user-access/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restrict-user-access/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-user-access/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-user-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-user-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-user-access/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/restrict-template-elements/#post-8425070)
 * Status: resolved