Related Articles

The developer-friendly, open source nature of the WordPress blogging platform makes it relatively easy to customize the appearance and function of your blog. WordPress themes contain HyperText Markup Language, Cascading Style Sheet and PHP -- Hypertext Preprocessor code -- that you can examine and edit to personalize your blog. You can embed images into a default WordPress theme by carefully inserting the HTML "" tag into an area of the main template, header or footer code that does not interfere with the theme's layout or the execution of its PHP code instructions.

1.

Log in to your WordPress blog.

2.

Click the "Appearance" menu on the Dashboard.

3.

Click the "Editor" link. Click the "Main Index Template" located under "Templates."

4.

Scroll down the code in the editor. Locate the section of the page you would want the image to appear. Note the location of the PHP tags "" near to the spot you want to place your image. Insert two blank lines above the nearest "<php?" tag to the spot you want to place your image. This approach avoids possible PHP interpreter errors caused by HTML code being in the wrong place and in the wrong format.

5.

Type the following code in the blank space you created:

Replace "directory/myimage.jpg" with the URL to the image you want. For example, if you have an image called "dove.gif" in a subdirectory named "images", you should enter:

6.

Click the "Update File" button to save your changes.

7.

Click your blog's name located next to the WordPress logo in the upper left side of the Dashboard to view your site.

Things Needed

File Transport Protocol Client

Tip

Test your theme changes by using a copy, rather than the working version of the default theme. Use your FTP client to download a copy of your default theme. Rename the default theme on your Web server, then upload the copy you made back to your server. If you make mistakes with the copy that you can't undo, you can always delete it, then restore the name of the original default theme folder.

Warning

View your WordPress blog with several different Web browsers and mobile devices to make sure that the image you added appears as you expect it to. Your WordPress theme may be so rigidly coded that even small layout changes will break its design. You may have to relocate your image within the layout of the theme or adjust its height, width, margins and padding.

References (2)

About the Author

Allen Bethea has written articles on programming, web design,operating systems and computer hardware since 2002. He holds a Bachelor of Science from UNC-Chapel Hill and AAS degrees in office technology, mechanical engineering/drafting and internet technology. Allen has extensive experience with desktop and system software for both Windows and Linux operating systems.

Photo Credits

Thinkstock Images/Comstock/Getty Images

bibliography-iconicon for annotation tool Cite this Article

Choose Citation Style

Bethea, Allen. "How to Embed an Image in a Default Theme of a WordPress Blog Page." Small Business - Chron.com, http://smallbusiness.chron.com/embed-image-default-theme-wordpress-blog-44878.html. Accessed 14 September 2019.

Bethea, Allen. (n.d.). How to Embed an Image in a Default Theme of a WordPress Blog Page. Small Business - Chron.com. Retrieved from http://smallbusiness.chron.com/embed-image-default-theme-wordpress-blog-44878.html

Bethea, Allen. "How to Embed an Image in a Default Theme of a WordPress Blog Page" accessed September 14, 2019. http://smallbusiness.chron.com/embed-image-default-theme-wordpress-blog-44878.html

Note: Depending on which text editor you're pasting into, you might have to add the italics to the site name.