• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to add an image to 404.php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How to add an image to 404.php

This topic is: resolved

Tagged: 404.php, modifying the 404.php

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 1 month ago by MT1895.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • April 20, 2015 at 2:46 pm #148592
    MT1895
    Participant

    Hi guys,

    I submitted this question in an existing thread that is over a year old and decided to start a new one to ensure it would be viewed.
    _________________________

    I am using the Enterprise Pro theme.

    I modified the 404.php page wording which was easy because I simply added a couple of words.

    I love the look of the default 404 page but have no PHP skillls to change it to my liking.

    All I want to do is a add a small image to the page from my WP library.

    I was hoping it was as simple as adding html code but the html code was ignored.

    Is this an easy modification for me or do I need PHP skills to make this change?

    http://meazlesgolf.com/forums/
    April 21, 2015 at 3:58 am #148646
    Brad Dalton
    Participant

    You could use the is_404() conditional tag tag with any genesis hook in a custom function in your child themes functions file.

    Or

    You could hard code the path to the image or the image HTML ( Not recommended ) into a custom 404 page template.


    Tutorials for StudioPress Themes.

    April 21, 2015 at 3:59 am #148647
    Brad Dalton
    Participant

    This may also help http://wpsites.net/web-design/add-content-404-page-genesis/


    Tutorials for StudioPress Themes.

    April 21, 2015 at 10:11 am #148685
    MT1895
    Participant

    Thank you very much Brad Dalton for your prompt response. Although I am confident your suggestions would work, my brain does not work on that level (haha) as I have no measurable amount of knowledge with PHP.

    FTR, I was able to resolve this problem to a 90% satisfaction level. I read a thread from another forum that suggest I use an "echo" tag and place my html code between the tags. This was an acceptable solution although it was a bit tacky for me.

    I am grateful for the results but if I was able, I would have place my image a little higher on my page but again this worked to my liking.

    The reason I said it was a bit tacky was because I had to use the html code for a space (and many of them) to center the image as it was left justified and the "align" html code was ignored.

    Here is a page that do not exist so that you can see the results and I thank you again.

    meazlesgolf.com/studiopress

    April 21, 2015 at 11:29 am #148698
    Brad Dalton
    Participant

    You could wrap your image in a div so you can then position it.

    echo'<div class="your-class">Your HTML</div>';
    

    Tutorials for StudioPress Themes.

    April 21, 2015 at 1:26 pm #148704
    MT1895
    Participant

    Thanks again Brad 🙂

    I tried that and variations of it but it just ignored the code.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble