Tag Info

New answers tagged

0

You need to check to see whether the $_POST data contains your custom field information before saving it: if (!empty($_POST["intro"])) { update_post_meta($post->ID, "intro", $_POST["intro"]); } Also, Wordpress will pass the post ID and post object into your callback if you ask it too. function save_intro($ID, $post){ //preserve the data in the ...


3

First things first, avoid defining functions inside functions. PHP doesn't have a problem with it, but it's usually a sign you're "doing it wrong" and it just leads to unnecessary headaches. Second, your foreach loop at the bottom is a little malformed. You need to define the <ul> outside the loop, and then append to $html - otherwise you just end up ...


0

Fixed it. Put in a few commands that helped give wordpress the permissions it needed to auto update: sudo usermod -aG www-data $USER sudo chown -R www-data:www-data /var/www sudo chmod -R 774 /var/www This problem has been plaguing me for months. I feel like a huge weight has been lifted off my chest now haha.


0

Checking the codex you could try this with a filter too like add_filter( 'auto_update_core', '__return_false' ); to add: in the themes functions.php of course, not in the wp-config.



Top 50 recent answers are included