- This topic has 14 replies, 3 voices, and was last updated 4 years, 5 months ago by David.
-
AuthorPosts
-
April 5, 2020 at 2:19 am #1227049Osman
Hi,
I LOVE the GeneratePress theme especially the speed!
I am looking to customise the aesthetics of this theme.
Firstly, I want to change the top section of post, blog and pages to look like the following website:
https://backlinko.com/keyword-research (Article page) – Blend page title with image
https://backlinko.com/content-marketing-tips (Article page) – Blend page title with image
https://backlinko.com/blog (Blog page) – Add optin at topCan someone please get back to me.
thanks
April 5, 2020 at 6:05 am #1227204DavidStaffCustomer SupportHi there,
check out the Header Element:
https://docs.generatepress.com/article/header-element-overview/
They also accept shortcodes – which you can use to add your Optin Form.
April 5, 2020 at 12:46 pm #1227729OsmanHi,
Thanks fo your reply.
I implemented your suggestions but I need the post title to be on top and the post image to be below it like:
https://backlinko.com/keyword-research-tool-analysis
Please help
April 5, 2020 at 2:36 pm #1227808LeoStaffCustomer SupportYou can output the post title and featured image using template tags:
https://docs.generatepress.com/article/header-element-template-tags/#post_title
https://docs.generatepress.com/article/header-element-template-tags/#custom_field-nameApril 5, 2020 at 11:44 pm #1228052OsmanHi,
This is not answering my question. The closest thing I saw that will give me the customisations I need is found here:
https://docs.generatepress.com/article/page-hero-examples/
However, I’m looking for any these outcome:
https://backlinko.com/content-marketing-tips
https://backlinko.com/keyword-research-tool-analysisPlease help
April 6, 2020 at 3:40 am #1228231DavidStaffCustomer SupportIf we can help tackle one of them to begin with:
https://backlinko.com/keyword-research-tool-analysis1. Add this PHP snippet to your site:
function db_feat_img_shortcode() { $img_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large', false ); return '<img src="' . $img_src[0] . '"/>'; } add_shortcode( 'db_feat_img', 'db_feat_img_shortcode' );
https://docs.generatepress.com/article/adding-php/
2.Configure the Header Element as per this example:
https://docs.generatepress.com/article/page-hero-examples/#example-2Change the Background Image to none, and give it a background color.
Then below the last line of content add this shortcode:[db_feat_img]
April 6, 2020 at 1:01 pm #1228994OsmanHi David,
It’s getting there – just need a few tweaks to look like this:
https://backlinko.com/content-marketing-tipsIve decided this is the template i want my posts to look like
I would appreciate your help to make it look like this
Thanks
April 6, 2020 at 1:40 pm #1229035DavidStaffCustomer SupportEdit the Header element and:
1. in Element Classes add:post-hero
2. give it 65px of Top Padding.Then add this CSS:
.post-hero time + img { display: block; border-radius: 8px; margin-left: auto; margin-right: auto; margin-top: 40px; margin-bottom: -160px !important; } .post-hero + #page { padding-top: 140px; }
April 6, 2020 at 11:31 pm #1229378OsmanHi
It’s getting there – The background colour (purple) shouldn’t be the same height as image – I want it to be half way in the middle of the image like:
https://backlinko.com/content-marketing-tips
Is this possible?
April 7, 2020 at 3:11 am #1229571DavidStaffCustomer SupportI made minor change to the CSS here:
Which was adding !import to
margin-bottom: -160px !important;
This will create the overlapping image. Which means you must make this rule has sufficient top padding to stop the content from getting covered:.post-hero + #page { padding-top: 140px; }
April 7, 2020 at 7:23 am #1229806OsmanHi David
Thank you so much!
April 7, 2020 at 7:50 am #1229967OsmanQuick follow up question:
How do I get the following to be on one line in mobile:
[page_hero_gravatar] {{post_author}} {{post_date}}April 7, 2020 at 8:18 am #1230008DavidStaffCustomer SupportEdit the Header Element, next to padding you can select Mobile – reduce the left and right to 10px to give it more space, then add this CSS:
@media (max-width: 500px) { .page-hero span, .page-hero time { font-size: 14px; } }
April 7, 2020 at 9:09 am #1230091OsmanGenius!
Thanks
April 7, 2020 at 12:43 pm #1230333DavidStaffCustomer SupportGlad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.