Removing Buy button from all galleries
richpepp
Registered Users Posts: 360 Major grins
If anyone wants the css for this it is simply
.sm-gallery-buymenu {display:none}
I'm just adding this here in case anyone else is searching for it. We have a lot of galleries and I spotted that not all of them had been set with printing off. As I don't seem able to do that in bulk it seemed faster just to do it with css.
Loving the new smugmug. Got rid of most of my old code with just a few little bits like this left now
.sm-gallery-buymenu {display:none}
I'm just adding this here in case anyone else is searching for it. We have a lot of galleries and I spotted that not all of them had been set with printing off. As I don't seem able to do that in bulk it seemed faster just to do it with css.
Loving the new smugmug. Got rid of most of my old code with just a few little bits like this left now
0
Comments
You only see owner buy when you are logged in so do you really need to remove it? In any case the same code still appears to work (I just tried it on my galleries). Are you sure that you have applied the css to the whole site and not to a particular gallery? What I did was go to customise entire site and add a css section at the top. I then plugged the css code in there
I added the code to the entire site theme CSS. Sounds like I need to add it as you've mentioned above. Thanks
I tried placing it there on my site as well and it works perfectly. However the note beside the CSS link says that it only applies to every page that the theme applies to so maybe you have an issue with the theme used on different pages. I think that the way I did it bypasses that problem
/ɯoɔ˙ƃnɯƃnɯs˙ʇlɟsɐq//:dʇʇɥ
Edit: Figured it out (sort of)... It doesn't hide the button while using the Journal gallery style.
Interesting - I've never used that style. I'll need to see what the difference is
Yep, you're correct - it is a bit different in that style of gallery. You need to add this code as well
.sm-gallery-buy-icon {
display: none;
}
Edit: Just checked and the same code works for OwnerBuy using the Journal style on one of my galleries. Can you point us at which gallery you are looking at or is it private? Even without being logged in we may be able to see a bit better what the differences are
Site is www.photosbyadamlee.com
1. Go to a gallery where you see this problem
2. In Chrome press Ctrl-Shift-I to bring up developer tools. You should get a new half to your browser window appearing at the bottom
3. In the new developer window click on the 'Elements' tab on the left
4. Press Ctrl-F to start a find and then type 'Owner Buy' (without the quotation marks) to find the first owner buy button. The bottom left window should scroll to the line of code containing the owner buy button
And now you have to take care. The first class you see is something like 'sm-button-label' but that is far too general to hide. You need to look for the appropriate container class. In this case the next one up is 'sm-gallery-buy-icon' and it's clear what that does. On the right hand side of the bottom window you should see a window called 'Matched CSS rules' and if you have done everything correctly you should see .sm-gallery-buy-icon {display: none;}
You can also post up here the code you see around the Owner buy button and we can see which to use. e.g on a non journal gallery I see
Owner Buy
Good luck
Rich
The CSS commands had to be in a CSS box. Not the site wide theme CSS.
I already had a CSS box at the footer to hide the 'powered by Smugmug' line so I just added the lines there. Works great! Thanks for the help!
Awesome - well done. I misread your earlier messages and assumed that 'site-wide CSS' referred to the CSS box and not the theme
Yes, I got it worked too. Just to say that the CSS box must be at "All Galleries" Section. This is far enough
.sm-gallery-buymenu {
display: none;
}