save_post action not firing when save

You have some errors in your code. For example, you unset a not defined variable. Some lines bellow you try to use again a not defined variable….maybe this is what is causing the problems. Can you try this? (Edited, I think is better get_posts than new WP_Query in this case) function wpse_update_postmeta($post_id) { if (defined(‘DOING_AUTOSAVE’) … Read more

action future_post returns wrong date

function on_post_scheduled( $post_id, $post ) { // If this is just a revision, don’t do anything. if ( wp_is_post_revision( $post_id ) ) return; // If this is a ‘post’ post and post status is future. if ( (‘post’ == $post->post_type) && (‘future’ == $post->post_status)) { // do the thing zhu li! wp_die(‘<pre>’.print_r($post,true).'</pre>’); } } add_action( … Read more

Adding add_action function

The first thing to do is ensure that your template’s header.php and footer.php files contain, respectively, calls to wp_head() and wp_footer(). Without those functions, no actions hooked to wp_head / wp_footer will work.

Dealing with html forms [closed]

Use the following code: <form action=”action_page.php” method=”post”> First name:<br> <input type=”text” name=”firstname” value=””> <br> Last name:<br> <input type=”text” name=”lastname” value=””> <br> <input type=”submit” value=”Submit”> </form> and in file “action_page.php” Use the following code: $firstname = $_POST[“firstname”]; $lastname = $_POST[“lastname”]; You can read the information with the following code: <pre> <?php print_r($_POST); ؟> </pre> or var_dump($_POST);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)