Tagged: blog layout, sidebar
-
AuthorPosts
-
June 5, 2024 at 3:36 pm #1448476
Hi Enfold Team,
We are looking to create a custom post. I’ve gotten pretty far in matching to this:
https://welstestdev.wpenginepowered.com/wp-content/uploads/2024/06/MadeKnown-Post-Mockup-v1_06-03-24.pdfMy post with ALB and custom CSS on test site: See private
I’m struggling in two areas:
1 – The content(color section) overflows the width so I added width: 70% to Quick CSS which matches Enfold General Layout. Still, the right sidebar bumps to the bottom instead. I’ve tried width: auto and no difference.2 – The PDF view has the top left corner of the color section inverted. Not sure what to do there as what I’ve tried failed. Same with the :before for that tab style for bottom corner of the tab.
Your help is appreciated. I’m close but not there yet.
Last. Is there a better approach to this that you’d suggest? The goal is for each of the 5 categories to use the same layout but a different color scheme. I was going to create one blog post for each category that they could duplicate. Any direction or critique of my approach is welcome. Trying to push the envelope so that blog posts don’t look so generic.
Thank you!June 6, 2024 at 11:57 am #1448531Hey Julie,
Thank you for the link to your site, but I can’t login I get an error: undefined please check.
1: Color sections are full width elements so the sidebar will always show below it, try using a column instead.
2: the border-bottom-right-radius doesn’t support negative values, perhaps an easier way will be to use an image for the corner like this:
this corner has a transparent background and you can use white text over it.Best regards,
MikeJune 6, 2024 at 1:22 pm #1448540Hi Mike,
Thanks for your response and idea. Sometimes the obvious (color section 100%) smacks you right in the face when too close to details. I’ll try the image versus CSS approach. Thank you for that!Credentials refreshed. Ref. previous private info again.
Any feedback on…
“Last. Is there a better approach to this that you’d suggest? The goal is for each of the 5 categories to use the same layout but a different color scheme. I was going to create one blog post for each category that they could duplicate. Any direction or critique of my approach is welcome. Trying to push the envelope so that blog posts don’t look so generic.”June 6, 2024 at 9:47 pm #1448569Hi,
I would recommend adding the categories as a class to the single posts, try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:add_filter('body_class','add_category_to_single'); function add_category_to_single($classes) { if (is_single() ) { global $post; foreach((get_the_category($post->ID)) as $category) { $classes[] = $category->category_nicename; } } return $classes; }
This will add the categories as a body class, so for example if your post belongs to the categories News, Personal, Uncategorized
the body will have these classes:
So if you wanted to use CSS to target this it would look like:#top.news.personal.uncategorized { /* your color here */ }
You can make this would for only one category if you wish, my example just happened to have three.
Best regards,
MikeJune 13, 2024 at 2:52 pm #1449442This reply has been marked as private.June 13, 2024 at 5:22 pm #1449543June 13, 2024 at 6:43 pm #1449610This reply has been marked as private.June 14, 2024 at 2:30 am #1450038Hi,
Thank you for the update.
It should be -10px. You forgot to include the unit. Please replace the css rule with the following code:
.post-border-jd::before { content: url(//welstestdev.wpenginepowered.com/wp-content/uploads/2024/06/blogTabPerspective.png); position: relative; top: -62px !important; left: -10px; }
Best regards,
IsmaelJune 14, 2024 at 5:17 am #1450133Good eye! Thank you. Everything is beautiful now So appreciative for Enfold support!
Close ticket. -
AuthorPosts
- The topic ‘Blog layout with sidebar’ is closed to new replies.