add_rewrite_tag show Hello World blog post in all pages

I have add add_rewrite_tag function in my theme function file & its working fine where I need it, But its show hello world blog post on other post and pages.

add_action( ‘init’, ‘custom_rewrite_rule’ );
function custom_rewrite_rule(){
add_rewrite_tag( ‘%prod_brand%’, ‘([^&]+)’ );
add_rewrite_tag( ‘%prod_series%’, ‘([^&]+)’ );
}

Read more here:: add_rewrite_tag show Hello World blog post in all pages

Leave a Reply

Your email address will not be published. Required fields are marked *