#128788 My Custom 404 and 403 pages return 200 code

Landing Forums JupiterX WordPress Theme My Custom 404 and 403 pages return 200 code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Artak Arzumanyan

    Hi. I have custom 404 and 403 pages for my website and just realized that they are both returning 200 which is an error for google search console. I have the following cod ein my functions.php for customizing 404 page

    add_action('wp', function() {
    if (!is_404()) {
    return;
    }
    jupiterx_remove_action('jupiterx_header_partial_template');
    jupiterx_remove_action('jupiterx_main_header');
    jupiterx_remove_action('jupiterx_footer_partial_template');
    });
    Also tried to put something like status_header(403); inside of add_action but no success.
    How can I fix this issue for both 404 and 403 pages. Thank you

    Nodari Support Team

    Howdy Artak, hope you are doing well 🙂

    What happens on those pages without your customization in the funciton.php file?
    As usual, we need access details to verify your problem and debug it

    Best wishes

    Artak Arzumanyan

    Hi Nodari. Thanks for reply.
    Looks like it was caching issue. Fixed after cleaning the cache.

    Thank you

    Amir Rather Support Team

    You’re most welcome Artak 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login