Mar 17 2013

WordPress Gallery and Border removal

It is so annoying, the automatic insertion of border to the media gallery, with no easy way to remove them.

So, here is the answer:

.gallery img {border:none !important;}

Just that, into your child style sheet. No need to hack, as this post said. It’s a shame, because that is the first thing that comes up when you search. It is actually the second link on google that gives the right answer.

So, why is one right and one wrong, if they both work?  Here is why.  If you upgrade, or your client upgrades, and they don’t know about the hack, it reverts back to what it was before, and considering how often WordPress updates, that is a sure thing.

Remember, always make a child theme, and always make changes there.  You never know what the future holds