Articles of wp admin

Adding text in more than one language (at the same time)

I am building a wordpress site. On the upper-right hand corner of every page on the site I am going to have two (or more) flags, and clicking on any given flag should cause the site to display the text in the language corresponding to the given flag. In order to do this, I should […]

Detecting all admins that are logged in

I’m trying to find all users that are logged in to WordPress. I can detect myself, but I want to be able to find the other admins. Here is my current code to find myself. if (user_can( $current_user, ‘administrator’ )) { echo ‘<div class=”admin”> User currently logged in “‘ . $current_user->user_login . ‘”</div>’; }

Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php

I’ve set it so non-admin user can’t see the “Dashboard” link or can’t have access to the main “wp-admin/index.php” page. I’ve also added a plugin that restrict non-admin users from creating a new page. Whenever a non-admin users try to add a new page, they’ll be accidentally redirected to “wp-admin/index.php?permissions_error=true“, which is the main “wp-admin/index.php“, […]

Modify users.php page to create page/post on button clicked

I am trying to create a new Column in users.php (WordPress Users Page) with buttons. Each button, associated with the user, has to create a page or a post (based on my programmatically selection). I have some problem on how to call the function to create the page/post from inside the class. Here is some […]

Block access to wp-admin

I’m attempting to use a .htaccess file to block access to the wp-admin folder. I’ve read through the Brute Force Attacks doc ( and I’ve added the block below, using my ip addresses, to the .htaccess file and placed it in the wp-admin folder: # Block access to wp-admin. ErrorDocument 401 default order deny,allow allow […]

New wordpress install, what are the reasons the “Install Themes” tab is missing?

I just installed WordPress 4.0.1 (never ran this version before, but I remember this not being a problem with older versions) and gave the requisite permissions to the various folders to allow updates. But, logged in as admin, I still don’t have an “Install Themes” tab like I see in all the tutorials. I’ve been […]

Adding a menu item in the admin bar

I would like to add a new menu item in the admin bar. So far, I have done the following: function add_book_menu_item ($wp_admin_bar) { $args = array ( ‘id’ => ‘book’, ‘title’ => ‘Book’, ‘href’ => ‘’, ‘parent’ => ‘new-content’ ); $wp_admin_bar->add_node( $args ); } add_action(‘admin_bar_menu’, ‘add_book_menu_item’); This is creating the Book menu item underneath […]

How to return 404 when called edit-comments.php?

I removed the edit-comments.php link from the backend but I can still access to it when I know the link ./wp-admin/edit-comments.php. How can I deactivate this link as well and return a HTTP 404?

Menu is invisible in admin panel but it's visible in front-end

I am not able to see any menus I added in my website back-end and even I am not able to create a new menu. Though the menu I created earlier is showing. Please guide me on how I can make it visible so that I can add new pages in main menu. Let me […]

Why does this Quick Edit checkbox save the value only when unchecked?

I’m using the group of functions below to create a checkbox in the Quick Edit area of each post in the post listing at wp-admin/edit.php that saves a value to a custom field called headline_news. The issue is when the checkbox is checked, Quick Edit saves the value, but it won’t save again when I […]