• Resolved cztaki73

    (@cztaki73)


    hi

    i want to change to my Dyad Theme , the default settings so the images to appears with the original rezoloution to my Home Page- Featured Posts- and to Posts .
    Now the theme zoom them and they dont appear like i want.
    ———————————————-
    add_theme_support( ‘post-thumbnails’ );

    /* setting custom image size for thumbnails for dyad */
    add_image_size( ‘dyad-banner’, ‘1800’, ‘720’, true );
    add_image_size( ‘dyad-thumbnails’, ‘630’, ‘840’, true );
    add_image_size( ‘dyad-featured-image’, ‘960’, ‘1280’, true );
    add_image_size( ‘dyad-featured-image-horz’, ‘960’, ‘640’, true );

    ———————————————–

    i dont know if the above has to change , and if yes, what should i do.

    regards

    antony

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi Antony!

    You can change the default sizes that images are cropped at for your theme by first creating a child theme. You can find guidance for setting up a child theme here:

    https://codex.www.ads-software.com/Child_Themes
    https://wordpress.tv/2015/05/12/kathryn-presner-getting-comfortable-with-child-themes/

    In your child theme’s functions.php file, you can then add a custom function to override the parent’s:

    function dyad_child_featured() {
    add_image_size( 'dyad-featured-image', '960', '1280', true );
    }
    add_action( 'after_setup_theme', 'function dyad_child_featured', 11 );

    In the above, change dyad-featured-image with the specific function you’re trying to change and edit the width (960px in my example) and the height (1280px in my example) to your liking.

    Hope that’s helpful!

    As an extra heads up: It’s best to post questions about the Dyad theme to the dedicated forums here:

    https://www.ads-software.com/support/theme/dyad#postform

    We work through all questions that are posted there. ??

    Thread Starter cztaki73

    (@cztaki73)

    Thank you for your help and i will try it.

    Next time i will post to your mentioned link for Dyad Theme.
    Sorry….

    kind regards

    antony

    Thread Starter cztaki73

    (@cztaki73)

    i have already child theme and to the child theme fuction.php, i have only the below code :

    <?php
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
    function my_theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }
    ?>

    if i add yours , the home page doesnt look good and to a sigle post i see a line of this code………

    do i miss something……?

    Hi Antony,

    Did you add the code I provide directly below the ?> in the above? If so, that closing tag is not needed at all in your functions.php file. Try removing it and then adding the function I provided directly below it.

    Thread Starter cztaki73

    (@cztaki73)

    thank you for this

    i did that and now is ok.

    thank you for your assistance

    kind regards

    antony

    Thread Starter cztaki73

    (@cztaki73)

    and one last thing

    if i want to change —-‘dyad-featured-image-horz’—–

    i do the same right?

    Moderator Kathryn Presner

    (@zoonini)

    You could create a separate function with a new size for dyad-featured-image-horz following the example Siobhan gave you above. Just let us know if you get stuck with it.

    Thread Starter cztaki73

    (@cztaki73)

    Hi

    Thank you so much for your reply

    All these modifications are made because I want the images from library which I upload, to be to the right size, when appears to my Home page , the featured scrolling 6 posts have images, that now are zoomed by default from the settings….of the Theme

    I hope this to fix it

    I will make some testing and I will get back to you

    Kind regards

    Antony

    Thread Starter cztaki73

    (@cztaki73)

    Hi Kathryn

    the problem that i am facing, is that as i said to my last post , to the scrolling 6 posts, top,to my home page, the images are zoomed , which to my posts are fine.

    i hope to give you the right description….

    thank you

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Antony, on the home page, in the slider at the top, are you wanting the images not zoomed, or are you talking about when you click on one of the images in the slider and go to the single post page?

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Antony, after reading through things again, it appears like you do not want any images zoomed. With a responsive design, such as on Dyad, the images typically have a background-size of “cover” so that the image will always cover the available space.

    To see what this is going to look like on a single post page if we set the images to not zoom in and cover the space reserved for them, temporarily add the following CSS and then visit your Μετ? τα 43…; page to see the results.

    .is-singular .entry-media {
        background-repeat: no-repeat;
        background-size: contain;
    }

    This would change the image on your main page slider not to be zoomed in.

    .site-banner-thumbnail {
        background-size: contain !important;
        background-repeat: no-repeat;
    }

    Thread Starter cztaki73

    (@cztaki73)

    hi sacredpath

    i am sorry for misunderstanding.

    Yes thats right, to my Home Page ,in the slider at the top, i dont want the images zoomed.(and to single posts but the Home Page slider is the Main issue)

    i tried your solution and i saw how it looks….
    it is not fine , even if the images are to original size , the left and right space is blank , and it is not appears as it should be.
    its not looking good at all.

    as it is now the Theme is beautiful with large images, and i want it as it is.

    i will keep it as it is , and i hope to a future solution update on this,
    exept if there is an another solution.

    thank you all for your time.

    kind regards

    antony

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Antony, I am going to be chatting with out theme developers on a similar issue for a different theme and if we can come up with a way of keeping the image full regardless of the width of the screen, I will pass that along in this thread. The one thing with Dyad is that on the single post pages, the image is on the left of the content on screens/windows 960px and wider. This can be overridden with CSS and media queries, but that is only a small part of what you are asking.

    Thread Starter cztaki73

    (@cztaki73)

    hi sacredpath

    Thank you so much for the reply.

    I want to thank you all for your support providing to Dyad Theme.
    You are helping so much, and I have learned from you so many things.

    Kind regards

    Antony

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    You are welcome, Antony, and thanks for the kind words.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Dyad Theme – Featured Images Configuration’ is closed to new replies.