How to eliminate the Web Address / Web Link textbox from comment forms

You made a mistake when put your functions.php file into mu-plugins directory. Why? Because your file rendered above is not a plugin, it is just a script. WordPress looks for a plugin inside mu-plugins directory. So you have to do one of two things: Add plugin header into functions.php file Move functions.php file into your … Read more

Why is there a # and other characters in URL for WordPress site?

Check your database,maybe you’re hacked. Here what must be searched: wp_options,this is the name the wordpress option,the second record is your blog_name. (If you’re new bie in porgraming and/or wordpress here the steps: 1.Go to cpanel(on your hosting): 2.Search for “phpMyAdmin”and select it 3. Must be find your wordpress database, if you’re lucky the name … Read more

Rewrite rule for incoming urls

This solved both parts: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^archives/(.*)$ /\?p=$1 [R=301,L,QSA] </IfModule> The QSA flag maintained the query string automagically. Most importantly, I had to put it above the existing WordPress rewrite rules in order for it to work.

Using a taxonomy value as part of a post URL

Add or replace this to your register_taxonomy (in functions.php): ‘query_var’ => ‘city’, ‘rewrite’ => true Then append this to your functions.php add_filter(‘post_link’, ‘city_permalink’, 10, 3); add_filter(‘post_type_link’, ‘city_permalink’, 10, 3); function city_permalink($permalink, $post_id, $leavename) { if (strpos($permalink, ‘%city%’) === FALSE) return $permalink; // Get post $post = get_post($post_id); if (!$post) return $permalink; // Get taxonomy terms … Read more

Customize category URL

I figured this out by reading this article. It was very simple, all I had to do was: Change the $talks_cat_args[rewrite][slug] from ‘talks’ to ‘talks/category’ (which I had tried before) but missed… Make sure register_taxonomy is before register_post_type. Read the article, but it’s basically because of “how WP_Rewrite works as the process of deciphering permalinks … Read more