preserve url parameters from affliliate sites

Just in case somebody else has a similar problem I managed to solve it using this plug in https://offers.sportingblog.gr/wp-admin/plugin-install.php?tab=plugin-information&plugin=header-and-footer-scripts and then I added on the footer script the following code <script type=”text/javascript”> function getQueryParams(qs) { qs = qs.split(“+”).join(” “); var params = {}, tokens, re = /[?&]?([^=]+)=([^&]*)/g; while (tokens = re.exec(qs)) { params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); … Read more

Change WordPress comments url / word

In your functions.php add ( there are other rules relating to comment pages you can see them all with Rewrite Rules Inspector plugin, this one just covers the case you mention ) add_rewrite_rule ( ‘(.?.+?)/customname-([0-9]{1,})/?$’, ‘index.php?pagename=$matches[1]&cpage=$matches[2]’, ‘top’ ); you’ll also need to find in your theme ( possibly in your function.php ) where the comments … Read more

redirect 301 old url to new url

Well, you would have to add some re-write rules in your .htaccess file (unless there’s a plugin that can allow more complex 301 redirect rules). But, in your situation, if I understand correctly, it’s simply not possible to do it in one generic rewrite rule, due to the logic of your new URLs… If all … Read more

While Using Static Pages, How Can I Get /blog into the URL of Each Post?

In admin under Settings > Permalinks, select Custom Structure and enter /blog/%postname%/. This will prepend /blog/ to categories and tags by default, and any custom post types and taxonomies where you have not registered them with the with_front argument set to false. you can remove it from the built-in category and tag taxonomies by setting … Read more

Display content according to current URL

For this to work, you would have to add a rewrite that rewrites https://example.com/[manufacturer slug]/[brand slug] to index.php with e.g. manufacturer=[manufacturer slug]&brand=[brand slug]. e.g.: add_filter( ‘rewrite_rules_array’,’jf_insert_rewrite_rules’ ); function jf_insert_rewrite_rules( $rules ) { $newrules[‘^(.*)/(.*)/?$’] = ‘index.php?manufacturer=$matches[1]&brand=$matches[2]’; return $newrules + $rules; } Remember to goto permalinks page and hit save for the rewrite rules to be updated. … Read more