How To Display Content for Admin Only


Sponsored Links






Display Specific Content for Admin Only in WordPress can be done easily, all need to do just write some if else statement with same parameter. On this example I will show you how to display simple stats from WordPress and display it in front page. Like on our previous WordPress tricks, we need to tweak on theme files, on this tricks we will play around with footer.php, it’s because I want display this information on the footer area.

How To Display Content for Admin Only

How To Display Content for Admin Only

<?php global $user_ID; if( $user_ID ) : ?>
<?php if( current_user_can('level_10') ) : ?>
<?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?>
<?php endif; ?>
<?php endif; ?>

On Display Content for Admin Only code above what we have done is checked if current user logging has level_10, if the user have this level, the content will be displayed. if the user below or didn’t logging, nothing to displayed. It’s easy right? You can explore this tricks and add more expert featured

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Show Data for Registered/Logged User only

With tiny step, we can display menu or messages for currently logged for registered user in WordPress. We only need added extra function and done. On this tricks we will give some example. If have wrote similar tricks but this … Read More

How To Display Custom Content to Search Engine Visitors

There are so many WordPress blog, some of them added unique features, right now I will show you how to display custom content to Search Engine visitors only, You can replace what do you want to be added on Search … Read More

How to remove admin bar WordPress 3.1

Some people feels admin bar from WordPress 3.1 quite disturbing. I think its cool feature but if you want to remove this function, here it is some alternative that I’ve collected from this blog. Copy this code below and paste … Read More

How To Remove WordPress 3.1 Admin Bar

There are a lot of new features on WordPress 3.1, one popular feature is display WordPress Admin bar. This bar is added automatically by WordPress 3.1. This bar will be activated on your dashboard and the site itself (front page). … Read More

How To Display Recently Registered Users on WordPress

With little bit functions Display Recently Registered Users on WordPress with Gravatar is easy, we only need to write down little bit of code and the result will be displayed. This code is original resource from WP Recipes, we only … Read More

Display a sticky post only

WordPress is wonderful publishing platform, there are so many query that we can tweak it. On this chapter I will show you How to display a sticky post only in our loop. All need to do only written some code … Read More

How To Display Content for Admin Only / WordPress Tricks & Tips

Display Specific Content for Admin Only in WordPress can be done easily, all need to do just write some if else statement with same parameter. On this example I will read more

Source: http://wptricks.net/how-to-display-content-for-admin-only/

How can I display some content for admin user only in a page

Hi All, I would like to know that how can i show some content for admin user only ? for example, there is some function or information can be shown to read more

Source: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/1693af44-d603-47c1-8bb4-c8725f55a197/

Show Data for Registered/Logged User only / WordPress Tricks & Tips

Display Specific Content for Admin Only in WordPress can be done easily, all need to do just write some if else statement with same parameter. read more

Source: http://wptricks.net/show-data-for-registeredlogged-user-only/

Django | The Django admin site | Django documentation

fields will display on the same line and the content field will be displayed The admin will display a "Show all" link on the change list only if the total result count is read more

Source: https://docs.djangoproject.com/en/dev/ref/contrib/admin/

Admin - Configuration - EZ-Pages Settings - Zen Cart(tm) Wiki

Display of EZ-Pages content can be globally enabled/disabled for the header bar. Note: Warning only shows to the Admin and not to the public. Options are: read more

Source: http://www.zen-cart.com/wiki/index.php/Admin_-_Configuration_-_EZ-Pages_Settings


4 Responses to How To Display Content for Admin Only

  1. Pingback: How to Show Data for Registered/Logged User only # WordPress Tricks & Tips

  2. Pingback: wp-popular.com » Blog Archive » How To Display Specific Content for Admin Only in WordPress # WordPress Tricks

  3. Pingback: 显示登录用户可见信息 | IT博客聚合

  4. Mestres Info says:

    Fantastic solution!

    With this hint there, you can, for example, set for employees only see parts of the site, and other administrators only.

    I configured so that users registered as “collaborators”, Level 1, may see an area of the site, and another level 10, only I can see.

    Very cool tip, congratulations!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>