Community Forums › Forums › Archived Forums › Design Tips and Tricks › Cafe Pro Home Feature Image size
Tagged: cafe pro, front page header, header
- This topic has 6 replies, 5 voices, and was last updated 8 years ago by hipstershaun.
-
AuthorPosts
-
January 21, 2016 at 8:42 pm #177131LizParticipant
I have seen a site that is using a much shorter front page header image for the top of the home page and the inner pages <a
href="http://techiemuse.com/" target="_blank">http://techiemuse.com/
The default of the theme is an almost-fullscreen view of that first image on home page, and then shorter version on inner pages. Where can the sizes be changed? I don't think that it is a matter of uploading a different size.
The ideal is to have more of the home page "above the fold", and obviously any changes I need to make, need to work responsively.
January 26, 2016 at 5:01 pm #177631GingerParticipantDo you have a link to your site, or is the link above your site?
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
February 24, 2016 at 9:16 am #179797frobnMemberSet the max-height of front-page-header
Example:
.front-page-header { max-height: 500px; max-width: 100%; }
February 25, 2016 at 10:27 pm #179941socialsparkMemberI tried the code provided by @frobn above, but my header image keeps changing back randomly. You're supposed to see all of the bridge, with some of the marsh underneath, like this. It looked like that for awhile, but then it just changed back to where you only see the top of the bridge and the rest is sky. Like this. Then, after I work on it a little more, it goes back to the correct way! Here is a link to one of the inner pages: http://staging.bcolt.flywheelsites.com/support-beaufort-county-open-land-trust/
I am using Beaver Builder for the homepage and some of the inner pages.
Why could this be happening?
Thanks,
February 26, 2016 at 10:29 am #179986frobnMemberIt looks like you need to crop the top of the original image or adjust the background position.
February 26, 2016 at 12:40 pm #179997socialsparkMemberI have cropped it to the height I want, and set the max-height. In what way would I adjust the background position? It seems like it's zooming in sometimes, but not always.
April 26, 2016 at 4:04 pm #184469hipstershaunMemberI just had to do this for a client as well. The homepage uses javascript to determine the height of the viewport and then it uses that to set the height of the header so it fills the screen. The key is to keep the javascript from loading with the page. I did this by finding the code in front-page.php that enqueues the script and commenting it out. Now my homepage header acts just like the header on the other pages.
The code to comment out is below. If you're not familiar with php (I know enough to get into trouble), you comment it out by adding /* just before and */ just after the code you want ignored. Commenting it out rather than removing it allows you to quickly add the fuctionality back when the client changes their mind in two weeks.
add_action( 'wp_enqueue_scripts', 'cafe_enqueue_cafe_script' ); function cafe_enqueue_cafe_script() { wp_enqueue_script( 'home-script', get_bloginfo( 'stylesheet_directory' ) . '/js/home.js', array( 'jquery' ), '1.0.0' ); }
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.