Jump to content

samuelgruiz

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by samuelgruiz

  1. Hi, I wanted to add a code in functions.php file but unable to edit it. You can view the attached image for better understanding. It's Generatepress theme and website url is https://calculadoradediasfechasanos.com/ Looking forward to your suggesstions to fix it.
  2. Barand's solution is righ.The issue you're facing is likely because the URL behaves differently depending on whether index.php is explicitly mentioned. The code snippet you provided should work, but it can be simplified for clarity. Here's a refined version: <?php $currentpage = $_SERVER['REQUEST_URI']; if ($currentpage == '/' || $currentpage == '/index.php') { // Code for root or index.php page } else { // Code for other pages } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.