URL rewrite problem in WordPress plugin

If you want a rewrite rule that loads a post type archive from a different URL, the simplest way is via an internal rewrite, which doesn’t get inserted into .htaccess. Internal rewrites map URLs to query arguments, and must result in a successful main query: add_rewrite_rule( ‘some_url/?$’, ‘index.php?post_type=yourcpt’, ‘top’ );

WordPress drop domain alias

If you are NOT using WordPress MultiSite add the following in wp-config.php. define( ‘WP_HOME’, ‘http://klenotnictvi-benesov.cz’ ); define( ‘WP_SITEURL’, ‘http://klenotnictvi-benesov.cz’ ); If you ARE using WordPress MultiSite you will need to access the database directly and edit the wp_options table and change “siteurl” & “home” to the correct url. Here is more info on changing the … Read more