WordPress.org

Forums

Tiny Forge
[resolved] Display the featured images at the beginning of each post (7 posts)

  1. lotfi.elhafi
    Member
    Posted 1 year ago #

    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 (http://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.

  2. Tomas Mackevicius
    Member
    Theme Author

    Posted 1 year ago #

    Hi! Thanks for good word!

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

    http://greggbanse.com

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

  3. lotfi.elhafi
    Member
    Posted 1 year ago #

    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 http://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.

  4. Tomas Mackevicius
    Member
    Theme Author

    Posted 1 year ago #

    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 :-/

  5. lotfi.elhafi
    Member
    Posted 1 year ago #

    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.

  6. Tomas Mackevicius
    Member
    Theme Author

    Posted 1 year ago #

    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.

  7. davelee811
    Member
    Posted 1 year ago #

    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 625x328 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!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.