Save custom post data outside of default post form
Save custom post data outside of default post form
Save custom post data outside of default post form
I discovered that by adding a call to get_currentuserinfo(); in header.php the problem appears to be solved. I still do not know why it happened, but at least this is a working solution for anyone else who happens to have this problem. Note: Following @jgraup’s suggestion above, I’m posting this as an answer. However, I … Read more
OK i get solution from senior developer and tested.. problem is too many revisions and auto draft that’s why WordPress confuses to save new posts.. it works. i just install a plugin WP-optimize and click proceed it delete all posts which has status revision and auto draft. regards, ahsan
You can use add_role function : add_role( $role, $display_name, $capabilities ); Just set your custom values as you wish : add_role(‘basic_contributor’, ‘Basic Contributor’, array( ‘read’ => true, // True allows that capability ‘edit_posts’ => true, ‘delete_posts’ => false, // Use false to explicitly deny )); Plugin : https://wordpress.org/plugins/user-role-editor/
If you want to use the wp_category_checklist on pages that also non-admin users access. You have to include the following php: <? require_once(ABSPATH.’wp-admin/includes/template.php’); ?> Credit to Majick!
So, if you want it to fire on the front-end for both visitors users and logged-in users, you can do this: add_action( ‘wp_ajax_my_action’, ‘my_action_callback’ ); add_action( ‘wp_ajax_nopriv_my_action’, ‘my_action_callback’ ); Example add_action( ‘wp_ajax_GetPostMedia’, ‘GetPostMedia’ ); add_action( ‘wp_ajax_nopriv_GetPostMedia’, ‘GetPostMedia’ );
I was able to get a work around in place. Since I was deleting all blogs with no user interaction. I created two mysql queries and ran them. The first was to drop all tables associated with the given $blog_id the second was to remove that row from the wp_blogs table. $blogs = wp_get_sites( array(‘limit’ … Read more
In my experience WP doesn’t like being accessed from anywhere that’s not the site url in the wp_config table. If you want to change the URL to your new(?) one this codex page should help, however it will probably prevent you from accessing by your old(?) url.
Handling dozens of sidebars
First off, try to work on your code formatting. As it is, it’s rather unreadable and this makes it not only more difficult for us to understand how to help you, but also less scalable and suited for future use. Always try to adhere to the WordPress PHP Coding Standards. Now, on to the beef … Read more