Articles of wp admin

WordPress admin notice in plugin function

i have sample wordpress plugin class. Im hooking woocommerce woocommerce_saved_order_items and i want create a admin notice. Add action from __construct works, but when i want create a notice in hook function it doesnt appears, where is the problem? class SomeClass { private static $instance; public function __construct() { add_action(‘woocommerce_saved_order_items’,array($this,’orderStatusChange’),10,1); add_action(‘admin_notices’, array($this,’simple_notice’)); // This works […]

Custom post type editor with dynamic selects, one drop down populating a second second drop down not working

I have a custom post type where I am attempting to have one select populate the options of a second select in the custom post type’s editor. The first drop down pulls in a list of tags associated to a different custom post type. The second drop down is suppose return a list of the […]

Change the Default Pages Menu View in wp-admin

I can’t seem to figure out how to change the default view for “Pages” in the admin menu. The initial view is the “Pages” view (/wp-admin/edit.php?post_type=page) How could it change this to something else? Like “Add New Page”? (/wp-admin/post-new.php?post_type=page) I’ve tried several different options including rebuilding the menu with a custom menu, but it seems […]

Custom Theme Want To Remove One Category From All Displays

I created my own custom WordPress theme for my website, everything is great. However, I have a strange need, I have one category which is kind of a ‘placeholder’ for content which is automated and used by an automated background process. Each time this process finds new content to put into that category I end […]

How could I execute my plugin just in frontend (not in backend)

I don’t need my plugin running through wp-admin, including wp-login. How could I prevent it? is_admin works fine but i don’t know how to ignore everything related to wp-admin (like wp-login.php). Thanks.

How to change “wp-admin” to something else without search-replacing the core?

for example: instead of How would I do that? I’ve tried using this in htaccess but it won’t work: ##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS ##### Admin Base Rewrite ##### RewriteCond %{REQUEST_URI} wp-admin/ RewriteCond %{QUERY_STRING} !sercretword RewriteRule .*\.php [F,L] RewriteCond %{QUERY_STRING} !secretword RewriteRule ^secret_room/(.*) wp-admin/$1?%{QUERY_STRING}&secretword [L] ##### End Admin […]

Adding Visibility Options

I’ve searched for plugins but while some do halfway accomplish the task they are normally very complicated. I’d like to add option to the visibility menu when creating a page (and post, but page is more urgent). These options need to be: “Only visible to logged user” and “Only visible to guest (i.e. not logged […]

Change WP-Login or WP-Admin

Can I change the name of the wp-login or wp-admin file so that I can go to a different filename in order to login. I am trying to prevent hackers from finding my login and wp-login has become a very obvious option.

Open WordPress 'Add New Post' admin page with parameters set via $_GET

I want to launch my web browser from an automation tool I use and open WordPress “Add Nwe Post” page in the admin area with specific title and content (it varies everytime, I generate it dynamically on my local machine). I know that I can use This is fine. However, if I try to […]

How to inhibit dashboard and profile management access to normal users?

I am developing a site using WordPress, phpbb3 and WP phpbb Bridge. Users have to manage their profile through phpbb3 and I would like to inhibit normal users access to page . How can I implement that?