Have two different URLs show the homepage

WordPress will always try to redirect to the canonical URL to prevent duplicate content, so you’ll have to disable that mechanism to get another URL to display that page. First, your rewrite rule: add_rewrite_rule(‘^page1’, ‘index.php?pagename=your-page-name’, ‘top’); Then filter redirect_canonical to return false if the requested URL is your 2nd home URL: function my_redir_check( $redirect_url, $requested_url … Read more

Can’t add external rewrites

First off, don’t ever do this: add_action(‘init’, ‘flush_rewrite_rules’); Every time WordPress loads, you are going to flush the rewrite rules. You only need to do this once to make sure your rewrite shows up. Second, add_rewrite_tag only takes two arguments, the tag and the regex. If you want to specify a query variable directly, you’ll … Read more

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