Use the category name instead of category slug in permalinks

I did not test this, but this should do what you want. Put the following in your functions.php: add_filter(‘rewrite_rules_array’, ‘new_category_name_rewrite_rule’); function new_category_name_rewrite_rule($rules) { $new_rules = array(); $categories = get_categories(); foreach ($categories as $category) { $cat_name = preg_replace(‘#\s+#’, ‘-‘, $category->name); $new_rules[“https://wordpress.stackexchange.com/”.$category->slug.”https://wordpress.stackexchange.com/”] = “https://wordpress.stackexchange.com/”.urlencode($cat_name).”https://wordpress.stackexchange.com/”; } return $new_rules + $rules; }

How can I redirect this contact form to a specific permalink

If your form has been incorporated into WordPress as a page template, which I encourage, then get_permalink(8); // or 12 should do it. If not, then http://example.com/?p=8 and http://example.com/?p=12 should always work. http://example.com/?page_id=8 and http://example.com/?page_id=12 uses the proper parameter for pages but ?p= works fine when I test it.

implement separate templates for 1 post type

You may use template redirect action to check if there is parameter set for description and based on that you can show desired template. <?php add_action(‘template_redirect’, ‘course_template_redirect’, 1); function course_template_redirect() { global $wp_query; if($wp_query->post_type==’courses’ and $_REQUEST[‘showdesc’]==’1′) { //include your template from your theme folder. for e.g include(‘mytheme/coursetemplate.php’); } } ?>

Using one slug/post-name for multiple pages

This is not natively possible, since in your example permalink structure posts are detected by slug alone, and not combination with category. Essentially category info gets simply discarded. If your requirements involve only one (few) of possible endings for URL you might achieve this relatively easy using endpoints, see add_rewrite_endpoint(). However in generic scenario slug … Read more

Permalink Settings

mod_rewriteis probably not activated on your localhost that why permalink can’t work. Just uncomment this line in apache : #LoadModule rewrite_module modules/mod_rewrite.so

stripping tags from excerpt in WordPress is not working

the_excerpt() automatically echoes the excerpt text. What you need is get_the_excerpt(): <a href=”https://wordpress.stackexchange.com/questions/108530/<?php the_permalink() ?>” title=”<?php echo strip_tags( get_the_excerpt() ); ?>”> However, it probably won’t strip out ellipses (…) since they’re HTML entities, not tags.

Suddenly new posts have the default permalink instead of the post name

Nothing just happens for “no apparent reason”. Some new condition has caused this. Most likely a new plugin or update of an existing plugin. It is possible for a plugin or theme doing something crazy like flushing rewrite rules on every load could wipeout the existing rules. See this ticket for more info: http://core.trac.wordpress.org/ticket/18450#comment:34 if … Read more