Wp doesn’t save meta box data
I had the same problem and solved it by replacing if( !current_user_can( ‘edit_post’ ) ) return; by: if ( !current_user_can(‘edit_post’, $post_id) ) return;
I had the same problem and solved it by replacing if( !current_user_can( ‘edit_post’ ) ) return; by: if ( !current_user_can(‘edit_post’, $post_id) ) return;
Assuming that the two locations in the options table have your new domain URL, go into Settings, Permalinks and change the setting to something else (anything). Save it, then go back into the same screen and set it to what you want it to be.
I have the same issue on only one of the three wordpress sites managed by a multisite wordpress. I am not experienced with WordPress either, but I have managed to get uploads working by replacing if ( empty( $directory_cache ) ) { return; } by if ( empty( $directory_cache ) || !is_array($directory_cache) ) { return; … Read more
Not possible unless using isolated block editor, based on a reply from one of the WordPress developers which was really helpful.
First of all I am a careful (maybe paranoid) guy. I tried to login into a WordPress account few days ago and didn´t noticed it was the “Admin” login. I even notice that I can login via Twitch … but that was too late! If it’s not your account you should notify them! If you … Read more
This is why you use nonces. $.ajax({ type: “POST”, url: ‘/wp-admin/admin-ajax.php’, data: { action: ‘mail_function’, message: ‘test’, _nonce: <?php echo wp_create_nonce( ‘mail_function_’ . $post->ID ) ?>}, dataType: “html”, success: function(data) { } }); Then in your PHP function: function my_ajax_mailer() { if ( ! wp_verify_nonce( $_REQUEST[‘_nonce’], ‘mail_function_’ . $post->ID ) ) return; // send mail… … Read more
add this line to your wp-config.php file: define(‘WP_MEMORY_LIMIT’, ’64M’); OR If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
WP 4.1.1 seems to need a lot more memory than previous versions. Just add define(‘WP_MEMORY_LIMIT’, ‘256M’); in your wp-config.php file just before the /* Stop editing */ comment line and you should get rid of the blank screens. If you can’t access that much memory, go for less, but from my tests the minimum required … Read more
Try clearing your browsers cache and reloading the page. That’ll fix it. There is an explaination here (see problem number 2)
You could use Javascript <script type=”text/javascript”> function getCookie(c_name) { var i,x,y,ARRcookies=document.cookie.split(“;”); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf(“=”)); y=ARRcookies[i].substr(ARRcookies[i].indexOf(“=”)+1); x=x.replace(/^\s+|\s+$/g,””); if (x==c_name) { return unescape(y); } } } var logged_in=getCookie(“wordpress_logged_in_[HASH]”); if (logged_in!=null && logged_in!=””) { alert(“You are logged in!”); } else { alert(“You are logged out!”); } </script> NOTE: WordPress logged in cookie info can be found here. … Read more