• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

How To Display Images From Your Images Folder Anywhere In Any Theme

Carrie asked this question recently which i see fairly often.

I’m trying to add an image right before the post title for each blog post.

In this post i’ll show you how to display an image anywhere in any theme.

There’s 4 things you need to determine:

  1. Which hook position to use.
  2. Which conditional tag to use.
  3. Which class to use to style & position your image.
  4. The path to your image.

Here’s an example code snippet which includes all of the above which you can modify in the code.

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems