Redirect after closing Theme Customizer when user does not have permission for theme page

You can try this jQuery script injected via the customize_controls_print_footer_scripts hook: /** * Change the url of the Close link in the /wp-admin/customize.php page * See http://wordpress.stackexchange.com/q/116257 */ function change_close_url_wpse_116257() { $url = get_admin_url(); // Edit this to your needs printf( “<script> jQuery(document).ready( function(){ jQuery(‘#customize-header-actions a.back.button’).attr(‘href’, ‘%s’); }); </script>” , esc_js( $url ) ); } … Read more

Redirecting old site links to new site

I don’t think this needs any WordPress at all. I would set up a single .php script setting the headers as such: header(“HTTP/1.1 301 Moved Permanently”); header(‘Refresh: 5; URL=http://jill.com/name_of_the_article’); And then whatever content you wish. Then I would set up a redirect to the said .php script. You would have to fetch the particular name … Read more

Redirect Old domain & posts to new domain homepage

There are many useful threads on StackOverflow on how implement this, but here’s a small WP solution that you can apply without modifying your .htaccess file: add_action(‘init’, function() { $redirect_to_domain = ‘google.com’; // without protocol $https = false; // redirect to https ( default: http ) // don’t change the following unless you know what … Read more

Random and Erroneous WordPress Redirect

If the redirect comes from WordPress code, you can find out who is calling wp_redirect() by hooking into it: add_filter( ‘wp_redirect’, ‘wpse12721_wp_redirect’ ); function wpse12721_wp_redirect( $location ) { // Get a backtrace of who called us debug_print_backtrace(); // Cancel the redirect return false; }

WordPress Customizer: custom redirection after closing

You might try to use jQuery to change the url behind the Close link. Another idea would be to use wp_get_referer() to intercept the page loading when you go from customize.php to themes.php by hooking into the load-themes.php action: add_action( ‘load-themes.php’, ‘my_customize_redirect’ ); function my_customize_redirect() { if ( strstr( wp_get_referer(), ‘/wp-admin/customize.php’ ) ) { $url … Read more

htaccess wildcard redirect misses some URLs

You’ve put the redirect directive in the wrong place. It needs to go before the WordPress front-controller, otherwise, the redirect will simply get ignored for anything other than URLs that map directly to the filesystem. Since these domains are also on the same server (same hosting account I assume) then you will need to check … Read more

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