On IIS, stop WordPress from resaving my web.config file when I enter the Permalinks config page

You can prevent a “hard” flush, which updates .htaccess (Apache) or web.config (IIS), with the flush_rewrite_rules_hard filter. We can also use the __return_false helper function here. add_filter( ‘flush_rewrite_rules_hard’, ‘__return_false’ ); This code can be placed in your own plugin or a theme’s functions.php file.

Permalink problem ( Blog posts vs custom post types)

You have to set with_front to false when you register the post type to prevent any static prefix in your permalink structure from being prepended on custom post type permalinks. $args = array( ‘rewrite’ => array( ‘slug’ => ‘product’, ‘with_front’ => false ), // other args… );

Add URL to selected post in meta box

Super short version: Replace $post->post_title with get_permalink($post->ID). Short version: Add a filter to your current Code, where you output the post_title. $posts = get_posts(array(‘post_type’=> ‘lesson’, ‘post_status’=> ‘publish’, ‘suppress_filters’ => false, ‘posts_per_page’=>-1)); //here you add the HTML of the dropdown you add something like echo ‘<p>Select the lesson: <select name=”_dappcf_i_dropdown” class=”widefat” style=”width:170px” >’; foreach ($posts as … Read more

Custom Post Type Taxonomy – Permalinks generating, but posts not found

Your previous edit was a bit closer. Change the post type rewrite slug to: cosmetics/treatments/%treatment-type% Then change all instances of %type% to %treatment-type% in the treatment_permalink function. Everything should then work correctly after you flush rewrites. For future reference, the Monkeyman rewrite analyzer plugin is very helpful for debugging rewrite rules. As I mentioned, you … Read more