• Resolved finch3107

    (@finch3107)


    I wanted to add a little snippet to the function.php so I downloaded Ocean Extra and installed OceanWP Child Theme. However, now all pages are showing as “Not Found” and I have no idea why. I removed the snippet of code I added and it still won’t work so I know it is the child theme. Can anybody help me understand why this is happening?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @finch3107,

    We need to know the steps to reproduce it on a fresh WP.

    Also, would you please provide us with some screenshots or short video and images of the errors you faced step by step?

    You can upload your files to one of the following online services:
    https://postimages.org
    https://imgbb.com
    https://loom.com
    https://drive.google.com

    ____

    Perhaps it’s the permalinks issue, so please update permalinks from dashboard > Settings > permalinks (update this page; even without changes – Postname is recommended for all permalinks on your website).

    Also, you can contact your host provider and ask about this issue. Maybe they have a solution that we are not aware of. I fully examined the issue you have raised on this topic and could not see it on my end.

    Best Regards

    Thread Starter finch3107

    (@finch3107)

    Hi @skalanter , I have narrowed down the problem somewhat.

    Using OceanWP Child Theme– when a user is logged in, they see the “Page not found” message for all pages. When logged out the pages are there and visible. So I thought it could be to do with my page visibility and user settings. However…

    Using OceanWP– when logged in, they see all pages perfectly fine. When logged out, they see all pages perfectly fine.

    Therefore, I know it is to do with the child theme being active and the fact that users are logged in. Does this offer a better insight into my problem?

    • This reply was modified 1 year, 7 months ago by finch3107.

    Hello @finch3107,

    We have nothing on the child theme; perhaps you have customization.
    Also, we have not received any similar reports so far, and we can not reproduce that issue on our end.
    For troubleshooting, please follow the steps below, recheck your issue, and let us know the results.

    Troubleshooting child theme:
    1- Remove all customization on the child theme.
    2- add your customization one by one to the child theme.
    3- After adding each customization code, check your issue

    Note 1: In the staging website, if you have a cache plugin or server cache. You need to clear its cache contents or disable them.

    Note 2: Before it, please get a full backup from your website.

    Best Regards

    Thread Starter finch3107

    (@finch3107)

    Okay @skalanter , thanks. I have removed all customisation and now I can view the website as normal when logged in (phew). Thank you for your help. It must have been the code snippet I tried adding, do you have any idea why the below code would cause such an upset to the themes function.php?

    / limit post display to post author (excludes admins) function shapeSpace_set_only_author($query) { global $current_user; if (!current_user_can(‘manage_options’)) { $query->set(‘author’, $current_user->ID); } } add_action(‘pre_get_posts’, ‘shapeSpace_set_only_author’);

    Best

    • This reply was modified 1 year, 7 months ago by finch3107.
    Thread Starter finch3107

    (@finch3107)

    For context, I am using a plugin called USP. It allows users to submit their own posts and I was trying to use the code to ensure users could only see their own posts rather than everyone else’s.

    • This reply was modified 1 year, 7 months ago by finch3107.

    Hello @finch3107,

    Please get in touch with your third-party plugin author.
    Maybe they have a solution that we are not aware of.

    Best Regards

    Thread Starter finch3107

    (@finch3107)

    Okay @skalanter

    Thanks for your help and patience!

    Best

    • This reply was modified 1 year, 7 months ago by finch3107.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Child theme leads to “Page not found 404 error”’ is closed to new replies.