• 0

wordpress-theme 2017: featured image behaviour: where to set the height of the featured image!? 


Question

Hi there, good day dear community,


after having nailed down several issues with the set up of the theme twentyseventeen - 
the question today is: wordpress-theme 2017: featured image behaviour: where to set the height of the featured image!? 

 

Well while i was doing a little google-search i have found the following; I have been searching on the whole net in order to find something useful for the solution that i can apply various (different) on the WordPress-twentyseventeen-theme: Well what is wanted and what is needed: I have found a way to resize the so called featured image of the theme because its way too big. On post pages when you put a featured image its a perfect size on all devices, but when I try to put featured image on a regular page its way to big as well.


see the page: http://www.job-starter.com/  -  a truely beta-beta-page that only serves as a demo. 


see the images that are way too big: The questions are the following ones:

– how can I adjust the size so I can make like a header for the different pages, lets say i take the following size: 800 x 175

– can i do this by pasting this little text-chunk at the end of the css – in the so called css-file:


i have this following code in the theme-customizer - "additional CSS"

question: what do i need to change - in order to make the featured image smaller!?


see the code:

`


.wrap { max-width: 1366px; }

.wrap { max-width: 1366px; }

/*For Content*/
.has-sidebar:not(.error404) #primary {
width: 60%
}

/*For Sidebar*/
.has-sidebar #secondary {
width: 30%
}

/*Responsive*/
@media(max-width:768px) {
/*For Content*/
.has-sidebar:not(.error404) #primary {
width: 100%
}

/*For Sidebar*/
.has-sidebar #secondary {
width: 100%
}
}


/* STRUCTURE */

.wrap {
max-width: 80% !important;
}

.page.page-one-column:not(.twentyseventeen-front-page) #primary {
max-width: 100% !important;
}

@media screen and (min-width: 48em) {
.wrap {
max-width: 80% !important;
}
}

@media screen and (min-width: 30em) {

.page-one-column .panel-content .wrap {
max-width: 80% !important;
}
}

@media screen and (max-width: 650px) {

.wrap {
max-width: 95% !important;
}
}

[/code]

 

for any and all help i thank you - all help will be greatly appreciated

3 answers to this question

Recommended Posts

  • 0

hi there, 

i tried out some methods to do this customization: 

 

i navigated to the theme folder of "twentyseventeen" and opened the functions.iphp file. Afterwards i went to line no. "54" and tried out below code.

add_image_size( 'twentyseventeen-featured-image', 2000, 1200, true );

well my findings: i tried it out - changed all the both two values in this line - but with allmost no effect - i try to do further investigations. 

 

i tried out some methods to do this customization: 

i navigated to the theme folder of "twentyseventeen" and opened the functions.iphp file. Afterwards i went to line no. "54" and tried out below code.

add_image_size( 'twentyseventeen-featured-image', 2000, 1200, true );

well my findings: i tried it out - changed all the both two values in this line - but with allmost no effect - i try to do further investigations. 


see tbe page at: http://www.job-starter.com

love to hear from you

best regards

 


see tbe page at: http://www.job-starter.com

love to hear from you

best regards

  • 0

hello again good day 

 

- good day according to this page 

 

https://wordpress.org/support/topic/set-featured-image-is-huge-on-home-page/

 

found out more interesting approaches:   the people there discuss the following: 

 

 

citation of the above mentioned thread:

 

The panel background images are set to “cover” the open area with any photo or graphic with the following default CSS code from the theme:

 

 

.panel-image {
    background-position: center center;
    background-repeat: no-repeat;
    -webkit-background-size: cover;
    background-size: cover;
    position: relative;
}

 

 

Basically any featured image you apply to the page will be stretched to cover the area which is why your logo is oversized.

If you are still wanting to use your logo in that spot, then you need to add some custom CSS to the Additional CSS tab in the customizer to target that specific post featured image. The ID of your page there is 39, so it would have to be:

 

.post-39 .panel-image {
    background-size: auto;
}

 

 

You can also adjust the open space as well by adding a height such as:

 

height: 40vh;

 

Then your custom CSS would be something like:

 

@media screen and (min-width: 48em) {
   .post-39 .panel-image {height: 40vh;}
}



All together your CSS would be:

 

.post-39 .panel-image {
    background-size: auto;
}
@media screen and (min-width: 48em) {
   .post-39 .panel-image {height: 40vh;}
}


and subsequently....  they adviced to try this:


 

@media screen and (min-width: 48em) {
.background-fixed .panel-image {
    background-attachment: initial;
}


it should sort out the scrolling issue


Well at the moment i just struggle a  bit with the different approaches. 

i try to  figure out which one will fit here. 


look forward to hear from you 

many thanks for any and all help 

greetings

  • 0

This topic was automatically locked because it did not receive any replies for a year. If you want to have this topic reopened

  • please contact any staff moderator or
  • report the first post of the topic with the reason why it should be reopened.

Thank you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Ridiculous claim that the labor cost difference of $6000 annually would increase cost per phone by $200. The employees produce 3 phones per month or what?
    • Sparkle 2.20.1 by Razvan Serea Sparkle is a free, open-source Windows optimization tool designed to make your PC faster, cleaner, and more private. With Sparkle, you can easily debloat Windows by removing unnecessary apps and services, disable Microsoft tracking to enhance privacy, and apply performance tweaks to boost speed. Its cleaner removes junk and temporary files, while every change is safe and fully reversible. Sparkle also features a modern, user-friendly interface with automatic updates, making system maintenance simple. Explore over 39 tweaks, from disabling telemetry and hibernation to optimizing network and game settings, all aimed at customizing and enhancing your Windows experience. Sparkle supports Windows 10 and 11. Sparkle 2.20.1 changelog: You can now change the Animation Direction from Up, Left, or Off. Added configurable animation direction (Up, Left, Off) for improved accessibility Added TTL caching to the system info backend Refactored tweak application flow to await NvidiaProfileInspector Improved IPC listener cleanup to correctly remove specific listeners Fixed online status not updating after successful network requests Updated system info tests to support backend caching Removed electron-toolkit utils dependency in favor of internal is.dev helper Fixed unwanted files and folders being included in application bundles Download: Sparkle 2.20.1 | Portable | ~100.0 MB (Open Source) Links: Sparkle Website | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Never used the G7 Pro, but I've never had a good experience with that style of d-pad and fighting games.
    • And I just bought a seat cushion for my mesh chair. The chair feels nice but the first time I sat in it with boxers, I realized I don't like the feel of mesh on my legs. 😂
    • "This Dell 27 inch 4K 120Hz IPS monitor is really cheap after a very long time" ... Lol.
  • Recent Achievements

    • One Month Later
      JKR earned a badge
      One Month Later
    • Dedicated
      Asgardi earned a badge
      Dedicated
    • Conversation Starter
      jessse3334 earned a badge
      Conversation Starter
    • Reacting Well
      JuvenileDelinquent earned a badge
      Reacting Well
    • One Month Later
      Excellence2025 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      494
    2. 2
      +Edouard
      247
    3. 3
      PsYcHoKiLLa
      153
    4. 4
      Steven P.
      84
    5. 5
      macoman
      64
  • Tell a friend

    Love Neowin? Tell a friend!