using_index_permalinks(); if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['category_base'] ) ) { check_admin_referer( 'update-permalink' ); if ( isset( $_POST['permalink_structure'] ) ) { if ( isset( $_POST['selection'] ) && 'custom' != $_POST['selection'] ) { $permalink_structure = $_POST['selection']; } else { $permalink_structure = $_POST['permalink_structure']; } if ( ! empty( $permalink_structure ) ) { $permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) ); if ( $prefix && $blog_prefix ) { $permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure ); } else { $permalink_structure = $blog_prefix . $permalink_structure; } } $permalink_structure = sanitize_option( 'permalink_structure', $permalink_structure ); $wp_rewrite->set_permalink_structure( $permalink_structure ); } if ( isset( $_POST['category_base'] ) ) { $category_base = $_POST['category_base']; if ( ! empty( $category_base ) ) { $category_base = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $category_base ) ); } $wp_rewrite->set_category_base( $category_base ); } if ( isset( $_POST['tag_base'] ) ) { $tag_base = $_POST['tag_base']; if ( ! empty( $tag_base ) ) { $tag_base = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $tag_base ) ); } $wp_rewrite->set_tag_base( $tag_base ); } $message = __( 'Permalink structure updated.' ); // Flush rules and rebuild them flush_rewrite_rules(); if ( ! get_settings_errors() ) { add_settings_error( 'general', 'settings_updated', $message, 'updated' ); } set_transient( 'settings_errors', get_settings_errors(), 30 ); wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) ); exit; } //flush_rewrite_rules(); require( ABSPATH . 'site-admin/admin-header.php' ); ?>

'', 1 => $prefix . '/%year%/%monthnum%/%day%/%postname%/', 2 => $prefix . '/%year%/%monthnum%/%postname%/', 3 => $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/%post_id%', 4 => $prefix . '/%postname%/', ); ?>

topics as your category base would make your category links like %s/topics/uncategorized/. If you leave these blank the defaults will be used.' ), get_option( 'home' ) . $blog_prefix . $prefix ); ?>