Prevent redirect to page/page when reserved term ‘name’ in $_POST when value is a page/post title

I would actually suggest an alternative approach – remove the function that causes the redirect in the first place: function wpse_227033_disable_name_redirect() { if ( is_404() && isset( $_GET[‘name’], $_GET[‘instID’] ) ) remove_action( ‘template_redirect’, ‘redirect_canonical’ ); } add_action( ‘wp’, ‘wpse_227033_disable_name_redirect’ ); I’ve used the wp hook which runs pretty much just before template_redirect. Remember you’ll need … Read more

Facebook like button that redirects?

It’s not a simple process, but you can do it with some javascript code. Not to be shilling or anything, but my plugin Simple Facebook Connect makes this a LOT easier. Step 1: You need a Facebook Application for your website. SFC guides you through this and configures the javascript on your site. Step 2: … Read more

Using redirection plugin to pass URLs as lowercase to wordpress

Probably the best way is to implement a 404 handler of some kind. It should see if there are lowercase letters in the url and then redirect to the uppercase version. If you need help implementing a 404 handler, try looking at a simple plugin that handles 404s, such as this one: http://crowdfavorite.com/wordpress/plugins/404-notifier/ I’m not … Read more

WordPress Redirect based on the prescence of a cookie

why not use the init action hook: function has_my_cookie() { if (!is_admin()){ //Check to see if our cookie is set if not redirect to your desired page and set the cookie if ( !isset($_COOKIE[“sevisitor”])) { //setcookie setcookie(‘sevisitor’, 1, time()+1209600, “https://wordpress.stackexchange.com/”, “http://localhost/child/”, false); //Redirect wp_redirect( get_site_url().’/about-myself’ ); exit; } } } add_action(‘init’, ‘has_my_cookie’);

Stop unwanted WP redirection to new url

WordPress uses a function called wp_old_slug_redirect() to find out if you’re looking for a post whose slug was recently changed and redirect you to its new home. If you want to prevent this behaviour for this specific post, delete the _wp_old_slug post meta entry from the database for that post. If you want to prevent … Read more

WordPress overriding actual subdirectories

WordPress tries to be transparent for physical files and folders. So either something gets broken at server configuration level or at WP rewrites level. The first things to check in such cases would be disabling pretty permalinks and if there might be come paths generated by WP that conflict with that specific folder name.

How to create a php url redirection for nicer links

This solution works without creating new pages or changing anything. We will: 1. Set up a new rewrite rule and add a new query variable 2. Catch that case in a ‘pre_get_posts’ hook, fetch the post we need and do the redirection Note that if you have multiple posts with the same keyword_meta value, this … Read more

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