Forcing all posts associated with a custom post type to be private

You can hook onto save_post, wp_insert_post or wp_insert_post_data to modify the post object prior to it being inserted or saved. Using save_post or wp_insert_post the callback would need to declare two args and would receive the post object as the second incoming variable.. (and i’m showing you to cover the alternatives, TheDeadMedic’s example would be … Read more

Reset Password – change from name and email address

You can use the following two hooks to change name and email address Use the following in your active theme’s functions.php file. add_filter( ‘wp_mail_from’, ‘wpse_new_mail_from’ ); function wpse_new_mail_from( $old ) { return ‘your email address’; // Edit it with your email address } add_filter(‘wp_mail_from_name’, ‘wpse_new_mail_from_name’); function wpse_new_mail_from_name( $old ) { return ‘your name or your … Read more

How do I email a new page password to somebody every month?

First of all, you should wrap your cron into a method: function cronjob_once_every_month() { // Our custom cron interval: $schedules[‘every_month’] = array( ‘interval’ => 1 * MONTH_IN_SECONDS, ‘display’ => ‘Once every Month’ ); } a) set up an automated email Then you should schedule an action: if ( ! wp_next_scheduled( ‘cronjob_once_every_month’ ) ) { wp_schedule_event( … Read more

how to redirect to a custom password retrieval page

not sure i really follow you either, BUT what about filtering the wp_lostpassword_url from wp-includes/general-template.php function wp_lostpassword_url( $redirect=”” ) { $args = array( ‘action’ => ‘lostpassword’ ); if ( !empty($redirect) ) { $args[‘redirect_to’] = $redirect; } $lostpassword_url = add_query_arg( $args, network_site_url(‘wp-login.php’, ‘login’) ); return apply_filters( ‘lostpassword_url’, $lostpassword_url, $redirect ); } looks like it has a … Read more

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