[Resolved] page-header-image-single

Home Forums Support [Resolved] page-header-image-single

Home Forums Support page-header-image-single

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #18687
    David

    Hi, (sorry for mi pour english)

    i just install all GeneratePress addons and i have a little problem. I don’t want to have in all post a big image (with a fix width off 1200 px). I have a quick look on the code a found somethings in functions.php
    ` function generate_featured_page_header_area($class)
    {
    global $post;
    $page_header_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID, ‘full’) );
    $page_header_image_width = 1200;

    if ( !empty($page_header_image) ) :
    echo ‘<div class=”‘ . $class . ‘ grid-container grid-parent”>’;
    echo ‘toto‘;
    echo ‘</div>’;
    endif;
    }
    The image size is full and the width is fixed on the code (1200) and the function cannot be rewritten on child theme because your not test before the function if she already exist in the parent theme.

    It will be nice to have the opportunity to choose on each post if i want to have this image on the top and in with size (thumbnail, medium, full), the maximal width should come from the layout settings.

    Sorry if i’m wrong i have not read all you code and not friendly width WordPress.

    #18717
    Tom
    Lead Developer
    Lead Developer

    Hi David,

    You can adjust the size of the image quite easily using CSS.

    You can use the max-width attribute to add a maximum width to the image on that page, and it will resize down without losing quality.

    The reason I add the full image is because you can resize down without losing quality, but if you resize up, the quality is terrible.

    Let me know if you’d like the code on how to resize the image with CSS – it would be helpful if you could include the URL to the page in question so I can be specific πŸ™‚

    Let me know.

    #18857
    Nick

    Tom,

    On this subject, is there a way to have smaller featured images using the customizer, or will i have to find a way to edit the css?

    It’s just that I feel the featured images on the blog home page look too big. I would like them all to be scaled down and quite uniform in size to make the homepage neater.

    Thanks
    Nick

    #18870
    Tom
    Lead Developer
    Lead Developer

    Hi Nick,

    As of right now, the featured images sit on top of the post, which means they’re full width.

    If they weren’t full width, there would be white space on their sides, which wouldn’t look very good.

    Since they’re full width, the height is relative, and can result in super large featured images.

    I’m going to be adding a new option to the Blog addon which will allow you to:

    1. Set the size of the image.
    2. Set the alignment of the image (left, right).

    Doing that should remedy the super large images.

    You can also use the Page Header metabox to crop the height so they don’t end up super tall (but they’ll still be 100% width for now).

    Of course, I’m always happy to give specific CSS if I know what you want right now πŸ™‚

    #18904
    Nick

    Thanks for the quick reply, Tom.

    I can wait for the new options in the update, but thanks for the offer. My client isn’t in a hurry for the re-dev of their site, so I have time on my side right now.

    I think I kind of answered my own question in this post: http://www.generatepress.com/forums/topic/force-a-masonry-post-to-stay-normal-or-medium/

    Basically I’m just looking for a neat homepage using masonry, with not such big images. So I look forward to your update that will hopefully give more options for masonry size adjustments.

    Great theme by the way – and superb support. $20 for all these options out the box is bargain of the century for me!

    #18905
    Tom
    Lead Developer
    Lead Developer

    Thanks! I always appreciate feedback and suggestions πŸ™‚

    #19191
    David

    Hi Tom,

    Thanks for the quick answer.
    1) I understand the reason of full image to resize down.
    2) if the content area width is bigger >1200 you will have a white space in this cas to. The maximal image width should comme from layout setting ? ($content_width)
    3) If you define a picture in the page header section of a post, you have a good image and you want to have it on the head of the post. ex If you define somethings else in content is fine too. But if you define nothing in the page header a the post got a top image (need for the main page) this image will be big and not always have a good definition like in this page
    4) I found a solution if I won’t see the featured image on the post header. I don’t like but I add a html code that not have effect on the text in the post page header content so the header is not empty and you don’t use the featured image. Maybe a check boy “do not use featured image on the header” if the post header is empty.
    ex.
    5) it will nice if you define on each function (your selection) in your functions.php the possibility to rewrite it in a child theme. for that you have to test for each function if she exist before.if
    ( ! function_exists(‘function_name’)) { function function_name{

    }}
    6) if I use CSS i will have the same result for each post or i have code the post ID in the CSS it’s not a acceptable solution.

    Thanks for your good job.
    David

    #19192
    David
    #19195
    David

    If I use CSS and Post Format to determine different format that works fine.

    Do you plan to get a customization layout for different Post Format in future version ? and add the other format like gallery … ?

    1 more question. I use the plugin WP Ultimate Recipe for Recipe. It’s works but on the main page, i got from the recipe only the title and the abstract, no author, no publication date and no featured image. Do you have a issue to show this information like post?

    http://www.enrj.ch/

    Thanks
    David

    #19304
    Tom
    Lead Developer
    Lead Developer

    Hi David,

    You’re right, the max image size should come from the set container width – I’ll make that adjustment for the next version.

    Most functions are removable in child themes using remove_action as I usually use hooks to do everything.

    What exactly was “wrong” about the link you posted above with no featured image?

    I do plan on more layouts depending on Post Formats.

    I’ll have to test that recipe plugin – the featured image should definitely work in there.

    #19333
    David

    Hi Tom,

    the feature image was enlarged to 1200 with an original size off 600 so a wrong quality. I change the Post Format in aside and add this code in the css.

    .format-aside .page-header-image-single{
    display: none;
    }

    So I don’t see anymore the feature image on the header off this post.
    It was also possible to add html on the post, “page header” “content” but that not possible for the recipe because they are not post.

    I make a french translation of our theme would you like to have the .mo/.po files to add in your theme. I’m not finish right now and have to check somethings with you because 2-3 text are not translated. I see in an other post that I’m not the only one with this problem.

    Thanks a lot for our answer.

    #19373
    Tom
    Lead Developer
    Lead Developer

    Hi David,

    I’m travelling today so I’m not super helpful from my phone – my apologies.

    The 1200 should just be maximum width – if its stretching your small images there should be a CSS attribute forcing the image to be 100% wide that you can override.

    I’m aware that the page header doesn’t show for other post types – I’ll be making it so it shows up on all post types in the next version.

    I would love to have a French translation! Which strings aren’t translating for you? Same as the other post?

    Thanks for your help πŸ™‚

    #22204
    Tom
    Lead Developer
    Lead Developer

    Hi David,

    Just letting you know the next version of the Page Header addon does the following:

    1. Removes the “forcing” of images to be 1200px wide (that was dumb).
    2. Adds an option to set the width yourself if hard cropping.
    3. Allows you to set a link for the image.

    Let me know if I missed anything – and I’d still love that French translation πŸ™‚

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.