WordPress.org

Ready to get started?Download WordPress

Forums

Custom header image not showing (6 posts)

  1. thegh0sts
    Member
    Posted 10 months ago #

    Hi all,

    I am building a custom theme for a site and I am attempting to get custom header images to appear. I have added in the add_theme_support ('custom-header'); code for it in the functions.php file and nothing appears on the page.

    What am I missing? Keep in mind I am just starting out with wordpress.

  2. Timothy Jacobs
    Member
    Posted 10 months ago #

    Hey there,

    the add_theme_support function only enables people to choose a custom header on the back end. To actually implement it in your custom theme, you have to use another function, header_image() which returns the url of the header image.

  3. thegh0sts
    Member
    Posted 10 months ago #

    oh i see, so i only got the back end going...ok.

    is there some sample code i can refer to in regards to where the code is placed?

    I've also been looking up tutorials on how to create custom themes so I can be more competitive when it comes to building sites for clients.

  4. Timothy Jacobs
    Member
    Posted 10 months ago #

    Typically you would put it where ever you want in one of your theme files depending on how you set up your theme. Here is a tutorial.

  5. thegh0sts
    Member
    Posted 10 months ago #

    excellent, will give it a try.

    i hope there isn't much of a difference between 3.0 and 3.6.

  6. alchymyth
    The Sweeper & Moderator
    Posted 10 months ago #

    is there some sample code i can refer to

    header.php of the default theme Twenty Twelve for instance

Reply

You must log in to post.

About this Topic

Tags

No tags yet.