WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding an image to the beginning of every post (7 posts)

  1. Erwin
    Member
    Posted 1 year ago #

    Hey, everyone. I'm trying to add an image (the same one every time) to the beginning of every post (left-aligned, as part of the content) without having to add it every time I make a new post.

    I've tried to add it to single.php but had no success.

    I'm using Suffusion theme. Any help will be greatly appreciated! Thanks.

  2. zex2911
    Member
    Posted 1 year ago #

    It should work in single.php, inside the loop. Can you use pastebin and share here how your single.php looks like with the changes you made?

  3. Erwin
    Member
    Posted 1 year ago #

    I know it should, but it didn't. Maybe I'm not doing it right. Here's how it looks like:

    http://pastebin.com/FSP4Z5qS

    Thanks

  4. Sayontan Sinha
    Member
    Posted 1 year ago #

    That file is not the correct single.php. It is a shortcoming of the File Editor that the right file is not shown. See this for accessing the correct file: http://aquoid.com/forum/viewtopic.php?f=4&t=1499&p=6733&hilit=now+reading+single+php#p6754

  5. Erwin
    Member
    Posted 1 year ago #

    @Sayontan WOW, thanks. Here's the correct version of single.php:

    http://pastebin.com/ne0nH9Tm

  6. zex2911
    Member
    Posted 1 year ago #

    add code for that image into your single.php, just above suffusion_content(); line(around line 45). Hope that works for you

  7. Erwin
    Member
    Posted 1 year ago #

    Solved! Thanks, everybody!

Topic Closed

This topic has been closed to new replies.

About this Topic