phpwppro
Forum Replies Created
-
Forum: Plugins
In reply to: [Adminimize] Redirect after deleting postI have enough space on server..thanks for your help..!
Forum: Plugins
In reply to: [Adminimize] Redirect after deleting postStill no lucks..!
I am just confused why its working on localhost and neither working on host?
What issue can be?Forum: Plugins
In reply to: [Adminimize] Redirect after deleting postYes its working perfectly on localhost but when i upload it to my host which is 1&1 host then its not working..!
Forum: Plugins
In reply to: [Adminimize] Redirect after deleting postI have enabled the WP_DEBUG mode but when i activate it, its not showing any error neither in error log nor debug.log file.. I am using below constant to debug:
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, true);
define(‘SCRIPT_DEBUG’, true);but no luck 🙁
any ideas!
Forum: Plugins
In reply to: [Adminimize] Redirect after deleting postNope i have not enabled WP_DEBUG mode yet…! but i have written error_log(‘Redirect Hook’) into function redirect_after_trashing to know wordpress is calling this hook or not but whenever i do delete the hook, its not calling the my custom hook..!!
Forum: Plugins
In reply to: [Adminimize] Redirect after deleting postHi thanks for prompt reply
Yes, here is the code..
<?php
/*
* Plugin Name: Redirect on deleting post type friend_request
*/
function redirect_after_trashing( $post_id ) {$the_post = get_post( $post_id );
// get the deleted post types
$deleted_post_type = $the_post->post_type;if( $deleted_post_type == ‘friend_request’ ) {
wp_redirect( home_url() );
exit();
}
}
add_action( ‘trashed_post’, ‘redirect_after_trashing’, 10, 1 );What’s wrong with the code?
Thanks!
Forum: Plugins
In reply to: [Custom Post Type UI] Redirect after deleting postHi, thanks for your reply
I tried your code but its not working 🙁
what else to do?Thanks