WordPress.org

Ready to get started?Download WordPress

Forums

Leaf
Top picture on pages (17 posts)

  1. piazawa
    Member
    Posted 1 year ago #

    Hi,

    I'm setting up a website for a client, based on Leaf. She would like to have a top picture on each page, but over the title text. It should be over the text 'Parent page': http://wordpress.org/themes/leaf

    Is this possible to do?

  2. paulwpxp
    Font hero
    Posted 1 year ago #

    So that's called Header Image, or Custom Header, it's one of WP's core features and this theme supports it.

    You can see that it's called just before the main nav, just like you want.
    http://themes.svn.wordpress.org/leaf/1.0.8/header.php

  3. piazawa
    Member
    Posted 1 year ago #

    I'm talking about a different picture on each page, not the front page. Are we talking about the same?

  4. piazawa
    Member
    Posted 1 year ago #

    ...and below the main nav

  5. paulwpxp
    Font hero
    Posted 1 year ago #

    Are we talking about the same?

    No, I misunderstood your question.

    So it's the entry title of each page ?

    If so you have to make a child theme and override the content-page.php sneaking in a call to post thumbnail ( Feature Image ).

  6. piazawa
    Member
    Posted 1 year ago #

    Hm...ok. Thank you, paulwpxp :-)
    I'm not good at this child thing - yet. Maybe I have to find out how to do it...

  7. paulwpxp
    Font hero
    Posted 1 year ago #

  8. piazawa
    Member
    Posted 1 year ago #

    Thank you, I'll look into it :-)

  9. bradthomas127
    Member
    Theme Author

    Posted 1 year ago #

    I have a basic child theme starter on github with some info on how to use it: Leaf Child Github

  10. piazawa
    Member
    Posted 1 year ago #

    Thank you so much, Brad. I have downloaded the child, so I'll try to use it in the coming days. :-)

  11. piazawa
    Member
    Posted 1 year ago #

    Where do I place the hooks, btw?

  12. paulwpxp
    Font hero
    Posted 1 year ago #

    If you want to go with hook, there is leaf_page_before()

    If you want to override template, just put in the call to the_post_thumbnail() before the entry header inside content-page.php.

  13. piazawa
    Member
    Posted 1 year ago #

    In the functions.php-file for the child?

  14. paulwpxp
    Font hero
    Posted 1 year ago #

    All modifications is done in chid theme only, parent theme will always be as fresh.

    To modifiy thing via function, like adding hook, the code goes to functions.php file.

    To override template, the template itself, with the same name as used in parent theme, must be created.

    Child Themes
    http://codex.wordpress.org/Child_Themes

  15. piazawa
    Member
    Posted 1 year ago #

    This is a little bit too complicated for a newbie ;-)

    I have tried to visualize the problem here: http://toneskramstad.info/leaf-child-and-picture-above-page-title/

    All I want, is to be able to put a picture on top of each page, above the page title. It must be possible to place a different picture for different pages, so that each page has its own top picture.

    And, Brad: why the 'wp_footer' down i left hand corner?

  16. bradthomas127
    Member
    Theme Author

    Posted 1 year ago #

    @piazawa - Contact me I will try and make you a child theme today. Is wp_footer showing with the child theme because i don't see it showing on your site and it should not be showing? it's a hook for plugins and the theme to add scripts.

  17. piazawa
    Member
    Posted 1 year ago #

    It's correct that the wp_footer only shows on the child, not the parent theme.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic