WordPress.org

Ready to get started?Download WordPress

Forums

Insert banner into all posts (page.php) (5 posts)

  1. zookie_333
    Member
    Posted 2 years ago #

    I want to add a picture to all posts. How to hardcode a php to show the banner on all posts. I think i edit page.php but how?

    ../uploads/banner.png

    m.

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    as the name suggests, page.php is for pages;
    for posts try index.php or single.php;

    the html code for an image is:

    <img src="../uploads/banner.png" alt="" />

    you will possibly need to use the absolute path to the image.

  3. zookie_333
    Member
    Posted 2 years ago #

    index.php:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  4. zookie_333
    Member
    Posted 2 years ago #

    Where to add the image tag?

    this is my Single.php

    [Code moderated as per the Forum Rules. Please use the pastebin]

  5. alchymyth
    Forum Moderator
    Posted 2 years ago #

    I want to add a picture to all posts.

    Where to add the image tag?

    you need to describe in more detail where you want the image to show - then someone might be able to point to the location in your template where to add the image code.

Topic Closed

This topic has been closed to new replies.

About this Topic