Archived topic
Dynamic feature image doesnt change
19 replies · Started by Max on January 15, 2022
My dynamic feaure image doesnt change height.
When i change the width i see it moving. But when i change the height nothing happens
Hi Max,
How does the front end look like?
Any chance you can link us to the site in question?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Really big ;) hahaha
Can you link me to this page?
Check the link :)
The dynamic image block will respect the image's aspect ratio (in this case, it's 1/1), so if the width is set to 1080px, the height will be 1080px automatically no matter what value you entered in the height field.
If you want to keep 1080px as width, but 300px as height, I would recommend using GB Container block, then set a background image for it, make the background image dynamically pull the featured image.
If you watch the video here, you would understand how to use background image as featured image in a content template:
https://docs.generatepress.com/article/block-element-content-template/
Thanks i want a blog like this https://imu.nl/yoast-seo-wordt-beschikbaar-voor-shopify/
So i want all the header pics the same width and height. Is the video you sent the best option for this?
Cause i want that i can just upload a feature image. And that it automatically gets in the same dimensions as all the blogs.
Hi there,
Simplest option would be to upload images that are the aspect ratio you require - it is much more performant to use the size image you need...
OR - if you don't mind the images being cropped then remove the Featured Image block and instead add the Featured Image as a Dynamic Background
https://docs.generatepress.com/article/dynamic-data/#dynamic-background
You can then set a minimum height to the container.
in the left column you see there is a navigation of the blog. How can i make that? So if you press you automaticly go to that place.
You can achieve this using a block element (inside_left_sidebar hook), the links would be HTML anchor, assign the block element to post >all posts in location.
This video introduced how to use HTML anchor: https://www.youtube.com/watch?v=f_OaAiJ3oV4&t=176s&ab_channel=GeneratePress
I would suggest using custom field to store the HTML anchors, so they can be pulled dynamically.
In this video you can see how to pull the value from custom field: https://www.youtube.com/watch?v=H6wHd83DfDI&t=57s&ab_channel=GeneratePress
Can you check again. How do i change the background to grey. Like the website https://imu.nl/yoast-seo-wordt-beschikbaar-voor-shopify/. Also my header picture takes the whole width but i want the left side bar next to the header. Check my webpage again.
Also my header picture takes the whole width but i want the left side bar next to the header
Try using before_content hook.
How do i change the background to grey
Go to customizer > colors, set body and sidebar widgets background color to grey.
it works but i only want it on posts
so not on pages. Cause here is a page and i dont want i change here https://www.strijkerverf-wonen.nl/vloeren/
Then CSS is needed, try this:
body.single-post, .single-post .sidebar {
background-color: grey;
}
Can you check? Nothing changed