The fundamental difference is:
add_rewrite_rule()adds a particular rule which is interpreted
add_rewrite_tag()adds a placeholder to use in url structures. This placeholder is then used to generate multiple rules.
For instance – suppose you’re a travel agent advertising hotels in various countries. You may want a hotel’s url to be like:
//You'll need to register the country taxonomy here too.
//Add 'country' tag.
//Register hotel post type with %country$ tag
$args = array(
'rewrite' => array(
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.