how to have __() translating in languages different from admin?
Filter locale if is_admin() is TRUE: is_admin() && add_filter( ‘locale’, function() { return ‘it_IT’; });
Filter locale if is_admin() is TRUE: is_admin() && add_filter( ‘locale’, function() { return ‘it_IT’; });
Every post / page / post type is wrapped around a universal form with the ID of #post. So if you want to validate a page before submitting it you just need to say something like: jQuery(document).ready(function($){ $(‘#post’).submit(function(){ // Validate Stuff return false; }); }); Then you’ll want to actually enqueue your javascript – View … Read more
How can I add them to the middle? You won’t be able to add them directly where you want, but you can get close. There are four hooks to put stuff into the profile page: personal_options — fires on every user edit screen, including when a user is viewing their own profile. Directly above username. … Read more
This is very easy with post types generated by Pods. If you create a Custom Post Type with Pods, you can add this to Parent Menu ID: “edit.php?post_type=top_level_post_type”
Right now your error is that you forgot to enqueue them, function theme_enqueue_scripts(){ wp_register_script(‘modernizr’, get_stylesheet_directory_uri() . ‘/js/modernizr.js’); wp_register_script(‘require’, get_stylesheet_directory_uri() . ‘/js/vendor/requirejs/require.js’, array(), false, true); wp_register_script(‘global’, get_stylesheet_directory_uri() . ‘/js/global.js’, array(‘require’), false, true); wp_register_style(‘globalstyle’, get_stylesheet_directory_uri() . ‘/css/global.css’); wp_enqueue_script( array(‘modernizr’,’require’,’global’) ); wp_enqueue_style (‘globalstyle’); } add_action(‘wp_enqueue_scripts’, ‘theme_enqueue_scripts’); function navigation_script() { wp_register_script(‘admin-nav’, get_stylesheet_directory_uri() . ‘/js/admin-nav.js’,array(), null, true); wp_enqueue_script(‘admin-nav’); } add_action( … Read more
You can update the override the post labels: function wpse163462_rename_menu_post_to_article() { global $menu; global $submenu; $menu[5][0] = ‘Articles’; $submenu[‘edit.php’][5][0] = ‘Articles’; $submenu[‘edit.php’][10][0] = ‘Add Articles’; echo ”; } function wpse163462_rename_post_to_article() { global $wp_post_types; $labels = &$wp_post_types[‘post’]->labels; $labels->name=”Articles”; $labels->singular_name=”Article”; $labels->add_new = ‘Add Article’; $labels->add_new_item = ‘Add Article’; $labels->edit_item = ‘Edit Article’; $labels->new_item = ‘Article’; $labels->view_item = … Read more
So for your information (based on add_menu_page) i am suggesting you to check the codex of add_menu_page in wordpress http://codex.wordpress.org/Function_Reference/add_menu_page if you look into the parameter of add_menu_page third one is for $capability just change it below code manage_options to manage_wpse_173073 (or any name you want) and just assign that capability to your custom role. … Read more
Rather than blacklist logins, why not whitelist your own IP (example 12.345.67.891 below; or a range) for wp-login.php and in wp-admin for logins and administration? (No plugin needed). A whitelist will block everyone else except you from login. See http://httpd.apache.org/docs/2.4/howto/access.html in the .htaccess in the wp-admin folder: Options All -Indexes order deny,allow deny from all … Read more
In WordPress 4.1.1 at least, In the Menu editor, Categories > View All Tab shows empty categories.
The $function argument of add_menu_page should be a function that produces your page output, or if omitted, then the $menu_slug argument can be a file that when included will output the menu page. But your output right now has nothing to do with the add_menu_page call, the problem is that you’re requiring aio_dashboard.php, which has … Read more