Why won’t this rewrite rule work?

You have to make your rewrite rules account for the paged parameter, because otherwise they won’t. It would look somewhat like shown below. function test_add_rewrite_rules() { add_rewrite_rule( ‘businesses/(eat|stay|play)/(.+)/page/([0-9]+)/?$’, ‘index.php?post_type=businesses&display_category=$matches[1]&filters=$matches[2]&paged=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘businesses/(eat|stay|play)/page/([0-9]+)/?$’, ‘index.php?post_type=businesses&display_category=$matches[1]&paged=$matches[2]’, ‘top’ ); } add_action( ‘init’, ‘test_add_rewrite_rules’ );

Why is a custom post type’s URL “/?cposts=name-of-the-post” but default post’s URL is “/?p=ID”?

For normal posts you can set the permalink structure on Settings → Permalinks. All details can be found in the Codex For custom post types you can set the slug when you registering it: add_action( ‘init’, ‘create_posttype’ ); function create_posttype() { register_post_type( ‘cpost’, array( ‘labels’ => array( ‘name’ => __( ‘cpost’ ), ‘singular_name’ => __( … Read more

How to retrive previous Domain URL in Wp

If you have access to the wp-config.php on the server, you can add the following constants that will override the database. This does not save the settings but will at least get you viewing the site again. define( ‘WP_SITEURL’, ‘url_to_wordpress_core_files’ ); define( ‘WP_HOME’, ‘url_to_wordpress_front_end’ ); There is also a RELOCATE constant that will make the … Read more