• Resolved maije

    (@maije)


    Dear all,

    I am developing some functionalities within a child theme. As a base, I am using Twentyseventeen theme. I found an issue when activating my child theme and it is that the blog page is getting broken. If I go back and activate the parent theme, the blog page works smooth and like it is supposed to do, but when I activate the child theme, when opening the same URL, it redirects to a concrete PHP file of my child theme: https://www.iexpressmyself.com/blog/Model/Logic/pro_getStudents.php.

    I have no idea what could be the cause of this issue. I searched in my project files where I am mentioning that file and there is only 1 code line where I am doing a header(location…) to that URL and it is called when going to a specific menu and clicking on a concrete menu item.

    I removed a WP plugin I was using for redirecting to check that was not the cause, but still the same issue. I have created a new page called “News” and then in “Settings->Reading, make sure the “static page” option is marked and selected the “News” page as blog, click on save, go again to press on “news” and it takes me to the very same redirection (https://www.iexpressmyself.com/news/Model/Logic/pro_getStudents.php).

    Despite the page “alone” is not working, if I add it as a section to the Front Page Section Content, it shows perfectly fine the last posts… I also checked everything is fine within the appearance configurations.

    If I go to the page configuration itself, I am sure the permalink is correct, anyways if I edit it and re-write it again, I am getting the same redirection if I click on the permalink. I do not know where else to look for this issue or what can be causing it. I have no access to the server, so there is no code addition to .htaccess to create redirections and there are no custom rules in my WordPress theme.

    Thank you very much for your support.
    Best regards

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • > I searched in my project files where I am mentioning that file and there is only 1 code line where I am doing a header(location…) to that URL and it is called when going to a specific menu and clicking on a concrete menu item.

    Can you please share that line of code here? You should not need to use header(location) to redirect the menu item to any page.

    Thread Starter maije

    (@maije)

    Dear Samuel,

    I found the problem: in my child theme, my hotspot file was named “index.php”. This index is meant to work as a login checker and in case the login is correct or the user is already logged in, it redirects to different pages relying on the role and the current session state.

    The issue was that WordPress, for some reason, within the blog link, was calling an “index.php”, and (I don’t know why) it was looking for that “index.php” in my child theme’s folder, so when I pressed on Blog, it was calling my index file and it was redirecting to different pages with a redirection I was not able to find.

    To solve the issue, I just renamed the file “index.php” to a different one and now everything works fine. Just in case someone comes here to find the same problem.

    Thank you very much for your very appreciated support.
    Kind regards

    • This reply was modified 4 years, 5 months ago by maije.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child theme redirecting’ is closed to new replies.