Tags pages for different Custom Post Types and WooCommerce Products sharing Post Tags

I found out ! I just had to declare the paged rewrite rule before the non-paged rewrite rule… add_rewrite_rule( ‘activities/([^/]+)/page/([0-9]{1,})/?’, ‘index.php?tag=$matches[1]&product_cat=activities&pages=$matches[2]’, ‘top’ ); add_rewrite_rule( ‘activities/tag/([^/]+)’, ‘index.php?tag=$matches[1]&product_cat=activities’, ‘top’ );

How to add rewrite rule for product compare page?

Here you go: compare\/([^-vs-]*)(?:-vs-)([^-vs-]*)(?:-vs-)?([^-vs-]*)? Remember to escape backslashes (as I have done). I also made your lookups more consistent in their internal logic/structure. I assumed you wouldn’t want a second -vs- if the third product wasn’t there, so this is why you now have the second non-capturing group. Here is a link with the answer … Read more

URL rewrite problem in WordPress plugin

If you want a rewrite rule that loads a post type archive from a different URL, the simplest way is via an internal rewrite, which doesn’t get inserted into .htaccess. Internal rewrites map URLs to query arguments, and must result in a successful main query: add_rewrite_rule( ‘some_url/?$’, ‘index.php?post_type=yourcpt’, ‘top’ );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)