1

I am working on project where the previous web developer has left the company. There is redirect happening based on the query string and I can't figure out where. The example URL is https://www.example.com/?something. I want this URL to point to front-page.php, where as it is always pointing to home.php. That happens only when I have the query string something in the url. If I use somethingelse or nothing in the query string it would work fine and redirect to front-page.php.

I have read this article (https://developer.wordpress.org/themes/basics/template-hierarchy/) from WordPress but I sill can't figure out where the redirection is happening. I want the URL to point front-page.php

  • Have you tried looking for something inside your theme's directory? Use something like <?php echo shell_exec('grep -r "something" ./'); ?> within wp-content/themes/yourtheme/. If shell_exec is disabled in your server, you'll have to find a way around using pure PHP. Also consider scanning your plugins directory, maybe a plugin is handling the template file selection. – Eduardo Escobar Nov 27 '19 at 20:45
  • No, I have checked it's not causing the redirect. – Abel Nov 29 '19 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.