• 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

    • I have one of these monitors, i picked one up last year for cheap they work pretty well for everyday use and they are pretty clear and color isnt bad
    • Internet Download Manager (IDM) 6.43 Build 2 by Razvan Serea Internet Download Manager (IDM) is a tool to increase download speeds by up to 8 times due to its smart dynamic file segmentation technology. Unlike other download managers and accelerators, Internet Download Manager segments downloaded files dynamically during download process, and it reuses available connections without additional connect and login stages to achieve the best possible acceleration performance. Comprehensive error recovery and resume capability will restart broken or interrupted downloads due to lost connections, network problems, computer shutdowns, or unexpected power outages. All popular browsers are supported IDM integrates seamlessly into Google Chrome, FireFox, Microsoft Edge, Opera, Safari, Internet Explorer, Maxthon and all other popular browsers to automatically handle your downloads. You can also drag and drop files, or use Internet Download Manager from command line. The program supports proxy servers, ftp and http protocols, firewalls, redirects, cookies, authorization, MP3 audio and video content processing. IDM includes web site spider and grabber IDM downloads all required files that are specified with filters from web sites, for example all pictures from a web site, or subsets of web sites, or complete web sites for offline browsing. It's possible to schedule multiple grabber projects to run them once at a specified time, stop them at a specified time, or run periodically to synchronize changes. Easy downloading with one click When you click on a download link in a browser, IDM will take over the download and accelerate it. You don't need to do anything special, just browse the Internet as you usually do. IDM will catch your downloads and accelerate them. IDM supports HTTP, FTP, HTTPS and MMS protocols. Changes in Internet Download Manager 6.43 Build 2: Resolved the problem that caused a "403 Forbidden" error when downloading some files Fixed a problem causing IDM download panel not to appear on some websites Fixed a bug that caused a crash when converting some TS files to MP4 Download: Internet Download Manager 6.43 Build 2 | 11.9 MB (Shareware) Links: Internet Download Manager Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • It's in Experimental (26H2). Settings->Windows Update->Windows Insider Program. Then a) select Experimental, b) below that, select "Advanced Options" (where you will see the three options for "Experimental" builds -> select 26H2 (name change from 25H2 is rolling; so might be 25H2)
  • Recent Achievements

    • Dedicated
      Zeynel earned a badge
      Dedicated
    • 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
  • Popular Contributors

    1. 1
      +primortal
      495
    2. 2
      +Edouard
      246
    3. 3
      PsYcHoKiLLa
      154
    4. 4
      Steven P.
      86
    5. 5
      macoman
      65
  • Tell a friend

    Love Neowin? Tell a friend!