Custom CSS on homepage ONLY
Courtman
Registered Users Posts: 4 Big grins
I am tweaking my website and trying to make it look better, and am a relative novice on CSS. I have an Independent Homepage, and I want to add some CSS to tweak the footer on the homepage, and make it different from the other pages on the site. I've found though that when I select "Homepage" (not Entire Site) and then under Theme | Active Theme | Advanced | Edit CSS when I add the different CSS it changes the footer for the whole site. Is there a way to make the CSS applicable for the homepage only please?
https://www.eatshootfly.com/ - my Photography website on SmugMug. Still very much a Work In Progress!!!
Tagged:
0
Comments
Just add a CSS Block only on your home page. Then add your CSS there.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
I should add, if you prefer putting all of your CSS in your theme's CSS section, you can prefix any code with
.sm-page-home
. That will isolate your home page. Like this:.sm-page-home .sm-page-layout-region-footer {}
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Mike, you are indeed the star on this forum - thank you! It worked with a CSS placeholder (didn't realise that was an option, handy to know), but I tried the .sm-page-home and that didn't work for some reason, it just ignored it. Still, job done! For my next task...integrate Wordpress onto a page. This I fear may be a tricky one!
My website is WordPress. Only the galleries are SmugMug, so if you need help, you know where to find me.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Hi Courtman -
To Mikes point - the best way to approach this strategy is to customize your Wordpress site to look/feel like your SmugMug site for seamless branding/integration.
I have done this several times - my recommended Wordpress theme is 'Divi' by Elegant Themes. Very dynamic and secured theme.
Thanks so much - Jerryr
SmugMug Sites - Creative Examples
Favorite Images and SmugMug Designs
That's how my first site was written by the good folks at Fastline, so I will endeavour to do the same this time. For now I've dropped the feed from WordPress onto a page in my site, but it's far from an elegant solution. I'm just not entirely sure where to start with duplicating my SmugMug theme (a customised Deco) into WordPress - being able to copy the CSS file from SmugMug would be a good place to start I suspect, but how I'm not entirely sure!
I was using WordPress way before I got my SM site. So once I customized my FREE WordPress theme (won't use DIVI or any paid theme) to my tastes, I customized my SM site to match.
@Courtman - First off, the link in your signature is broken. As far as your site, you need to find either a WP theme/site that you like and use it, then match you SM site. Or if you like a SM site you've seen, try and match that to your WordPress theme. The second may be difficult because this is a SmugMug forum and not a WordPress forum.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Oops, didn't realise that about the signature - fixed it now. Seeing as I've got Smuggy to look how I want now pretty much (still working on the homepage a bit, I have a "bodge" fix for the slideshow at the moment which I'd like to make better but it's getting there) I will make WP look like Smuggy for my next trick. It'll keep me busy during lockdown and furlough!