Plugin html-on-pages: URL not redirecting

That plugin was last updated 2008-11-20 and it’s doubtful it will work with a new version of WordPress and correctly revert URLs or changes it makes. Try resetting permalinks in Dashboard>>Settings>>Permalinks. And, because your question is very specific to that plugin, you’re much better off asking in the wordpress.org forums tagged for that plugin: http://wordpress.org/support/plugin/html-on-pages

website is sending people to wrong address

Sounds like you have a problem in your database. Did you import it from somewhere else? Specifically within your wp_options table, the siteurl option is incorrect. Double check that to make sure it’s the right site name. If it’s wrong, then it’s probably wrong in a lot of other areas too, but changing that key … Read more

URL Custom Rewrite

You can do something like $path = $_SERVER[‘REQUEST_URI’]; if (home_url($path) == ‘http://www.myweb.com/action/frame’ ) { header(‘Location: ‘ . ‘http://www.myweb.com/wp-content/plugins/myplugin/frame.php’); }

Rewrite Rule working different than expected

I’ll add another answer because the rule is only a part of the problem. Here is what I have tested and is working : <?php class BadRewritesRules { public function __construct() { add_action(‘init’, [$this, ‘custom_post_types_rewrite_rules’]); remove_filter(‘template_redirect’, ‘redirect_canonical’); } public function custom_post_types_rewrite_rules() { add_rewrite_rule(‘(blog)/([0-9-]+)[/]?$’, ‘index.php?pagename=$matches[1]&paged=$matches[2]’, ‘top’); } } new BadRewritesRules(); In reality, I used another URL … Read more

Redirect to other page when mobile

You could use wp_is_mobile with wp_redirect if ( wp_is_mobile() AND is_front_page() ) { wp_redirect( $location, $status ); exit; } You can add the js directly to a front-page.php or home.php file or enqueue it directly from either file. Example: add_action(‘wp_enqueue_scripts’, ‘load_script’); function load_script(){ wp_enqueue_script( ‘script-handle’, get_stylesheet_directory_uri() . ‘/js/your-script.js’, array( ‘jquery’ ) ); }