[Resolved] 404 page files

Home Forums Support [Resolved] 404 page files

Home Forums Support 404 page files

  • This topic has 5 replies, 2 voices, and was last updated 7 months ago by Ying.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2322707
    Philip

    Hi Folks,

    I noticed that the GeneratePress theme has two 404-related files:

    1. 404.php
    2. content-404.php

    What is the difference between the two files, and how are they related?

    Thanks.

    Phil

    —–

    Host: WP Engine
    Server: Nginx
    PHP: 8.0.20
    WordPress: 6.0.1
    GeneratePress theme: 3.1.3 with starter child theme
    GP Premium: 2.1.2
    GenerateBlocks Pro: 1.3.0

    #2322762
    Ying
    Staff
    Customer Support

    Hi there,

    404.php includes the header/footer/content which is the template for the entire 404 page.

    content-404.php is the template for the content area of the 404 page.

    404.php uses content-404.php as its content template.

    #2322774
    Philip

    Understood. Thanks.

    So, if I wanted to modify the 404 content only (title, text), could I just copy the content-404.php file to my child theme?

    Or, is there a more efficient way?

    Phil

    #2322816
    Ying
    Staff
    Customer Support

    So, if I wanted to modify the 404 content only (title, text), could I just copy the content-404.php file to my child theme?

    Yes, if you are already using a child theme, this would be the easiest way ๐Ÿ™‚

    #2322827
    Philip

    Okay. Thanks again.

    #2322893
    Ying
    Staff
    Customer Support

    No problem ๐Ÿ™‚

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