• Resolved lotfi.elhafi

    (@lotfielhafi)


    Hi,

    First, let me thank you for your wonderful theme. I love the tutorials and commented tricks in the code, as well as the learning philosophy behind your work.

    I’ve been using a child of Tiny Forge for a year now on my personal website (https://lotfielhafi.com/) and managed to customize it to my liking. However, there is something I would like to do: use the featured image at the beginning of the post instead of having it displayed in the header. Unfortunately, I have no idea of how to do it. Could you point me what part of the code I should modify?

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Tomas Mackevicius

    (@tomasm)

    Hi! Thanks for good word!

    Do you want to have the picture only in archive views like here:

    https://greggbanse.com

    Or you want to disable Featured Image in post itself too?

    Thread Starter lotfi.elhafi

    (@lotfielhafi)

    I’ll try to precise my idea.

    I would like to keep my header across all pages/posts and have the feature image displayed just above (or below) the post title on the blog page (what you call archive view if I’m correct) but also on the post page (which is not the case on https://greggbanse.com).

    The problem with the current behavior is that using a 16:9 featured image to illustrate a post is not practical because the header become too big. And using thinner images is also difficult because I need to crop my pictures too much.

    Theme Author Tomas Mackevicius

    (@tomasm)

    Originally that was the way Twenty Twelve worked, but it didn’t have header image. I added header image and set it to also be a featured image, so you could have individual header per page or post.

    In this case I would recommend taking as an example theme Twenty Twelve and restoring that functionality from it.

    Compare the files for header.php and content.php. One of the earlier Tiny Forge versions had that peace in content.php in place, but just commented out, so you might try to find that version, I don’t remember exactly the number though :-/

    Thread Starter lotfi.elhafi

    (@lotfielhafi)

    OK, thanks for your help. Now I know where to start ??

    I will compare the files with Twenty Twelve then and try to restore that functionality from it. If I manage to do it, I will post the solution here.

    Theme Author Tomas Mackevicius

    (@tomasm)

    Just a quick idea. You could also leave header as it is, but create a new thumbnail size (example is in child’s functions.php) and display that new thumbnail before title.

    Just a quick idea. You could also leave header as it is, but create a new thumbnail size (example is in child’s functions.php) and display that new thumbnail before title.

    That’s what I wish todo;
    – if post has 625×328 post_thumbnail..
    – display above the post title
    – and NOT output the 960x__ default header image

    Also,
    – if NOT 960x__ default header image is output
    – output Title/Logo at top of page

    Optionally,
    – if post has 960x__ post_thumbnail
    – display (NO title/logo, NO default header image)

    I’ve got this mostly working in a child theme, but it’s a bit hacky. No problem with adding/handling images, but could use some pointers on the logic flow, header.php vs. content.php, conditional output.

    Could you recommend the best approach to this? I’d prefer to toggle output as opposed to doing with css.

    Thanks for the awesome theme.. excellent documentation!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display the featured images at the beginning of each post’ is closed to new replies.