• I was working on a theme. I created category.php for category view and 404.php for error page. It worked on my local server.

    But in the main server it is not working. The main server use wordpress multisite and I had to enable the theme through network admin. I have also created custom single page and those works, but the category page isn’t working. It always redirect to frontpage. I also have a front-page.php in my theme. I don’t understand why this is happening as it is violating template hierarchy.

    So, it might be something related to multisite. I don’t know much about multistie. Thanks in advance for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Is that theme active on the site?

    Do all 404 URLs redirect to the front page or only some?

    Are you using subdomains or subfolders for your sites?

    What’s in your .htaccess?

    Thread Starter sakibmoon

    (@sakibmoon)

    Yes. that theme is active on the site.
    No. not all 404 urls redirect to the front page. I am giving you a general idea

    https://www.example.com/category/category-name —- redirects to front page
    https://www.example.com/category/xxxxx —- redirects to front page
    https://www.example.com/xxxxx —- redirects to front page
    https://www.example.com/xxxx/xxxx —- goes to 404 page

    I am using the main site. No subdomain or subfolder

    I am not sure about .htaccess. I guess .htaccess is not created. I don’t see one anywhere.

    Thread Starter sakibmoon

    (@sakibmoon)

    Another update is the site use wpmudev

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That isn’t what I mean. ??

    Are your subsites subFOLDERS? (The answer here is important, if you’re using subfolders, then the problem is you may have noblogredirect set in your wp-config)

    Thread Starter sakibmoon

    (@sakibmoon)

    No. not subfolders. and NOBLOGREDIRECT is not defined in wp-config

    Thread Starter sakibmoon

    (@sakibmoon)

    Off-topic:
    I was reading your site’s “about me” page and I must say wow.
    I am surprised to hear that you are not wordpress support staff. Your dedication surprise me. They should make you their #1 support stuff(no offense to others), considering the amount of support you have provided.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Hah, I work for DreamHost doing WP support now (I may have to update my site…).

    Okay, so you’re using sitename.domain.com for your subsites. Do their paths work? Like if you go to sitename.domain.com/madeupURL does that 404 correctly?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘theme 404.php and category.php redirect to homepage’ is closed to new replies.