Snippets

Skip to content
Menu
  • ALL
  • WordPress
  • CSS
  • JavaScript
  • Other
Posted on December 31, 2018December 31, 2018 by tadej

User ID condition

User ID condition

$user_id = get_current_user_id();
if ($user_id == 2) {
    #CODE
}
Posted in WordpressTagged Admin, User

Published by tadej

View all posts by tadej

Post navigation

Prev Admin Menu – Edit
Next PHP Debug

Categories

  • CSS
  • External
  • External
  • JavaScript
  • Other
  • PHP
  • Wordpress

Tags

ACF (4) Admin (7) ajax (1) animation (1) api (1) Avatar (1) backend (1) cookie (1) disable (1) editor (2) email (2) gallery (1) Google analytics (3) google maps (1) Header (1) hidding (1) hide (1) htaccess (1) IE (1) Image (3) javascript (2) jQuery (1) Lightbox (1) Login (1) Menu (2) PHP (1) Post type (1) redirect (4) revolution slider (1) scroll (2) search (2) seo (1) slick slider (3) Sticky (1) svg (2) theme (1) User (2) video (1) Visual Composer (1) Woocommerce (11) Yoast (1)

Recent Posts

  • Rename Order Status Messages in WooCommerce
  • Minimum and maximum allowable product quantities to be added in WooCommerce Cart
  • Add to Cart Quantity Plus & Minus Buttons
  • Disable WordPress Auto-Update Email Notifications
  • URL parameter value with js / javascript
© Copyright 2024 – Snippets
Wisteria Theme by WPFriendship ⋅ Powered by WordPress