how to automatically cleanup failed WordPress uploads in /tmp?
how to automatically cleanup failed WordPress uploads in /tmp?
how to automatically cleanup failed WordPress uploads in /tmp?
You can’t. Create a function that loads that file: function load_admin_page_file() { require ‘admin-members.php’; } Then use that function name as callback argument. In PHP 5.3 you can use a lambda: add_menu_page( ‘Members’, ‘Members’, ‘manage_options’, ‘members’, function() { require ‘admin-members.php’; } );
Adding additional text fields and image upload to a Page?
From inside a comment Loop… $author_data = get_user_by(‘login’,$comment->comment_author); if (!empty($author_data)) { var_dump($author_data->roles); } $author_data->roles is an array so you will need to work out what you want to do with that. That is, print them all? Print the highest ranking role? if (array_intersect(array(‘administrator’,’moderator’),$author_data->roles)) { echo ‘admin’; } elseif (array_intersect(array(‘something’,’else’),$author_data->roles)) { echo ‘something else’; }
WP Logs me out after updating anything on dashboard
For anyone interested, it was the SEOyoast plugin that caused the problem. I turned it off and on, than the page appeared again in the admin. After that I rest the settings for the page and it now works as expected and accepts its template.
Well, it won’t be easy, but you can do this in this way: Add a Custom Post Type (you can restrict access to this CPT for admin only). Use Advanced Custom Fields plugin and create custom fields template for your Custom Post Type from 1. Create a custom page template and place custom query inside … Read more
Your 2nd example omits the leading / in the URL — does /wp-admin/edit.php work? Also, you’re wiser to use admin_url(), since it’s possible to change the Admin URL to something other than /wp-admin. Instead of <a href=”https://wordpress.stackexchange.com/wp-admin/edit.php”>, use <a href=”https://wordpress.stackexchange.com/questions/103685/<?php echo( admin_url(“edit.php’ ) ); ?>”>. It’s more complicated, but much safer.
So show all posts in one category I can do something like this edit.php?filter-posts=category_id_number Replace the category_id_number with the ID number of the category like 3. But not sure for the new page link
WordPress gallery image link gives 404 when not logged in