Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-01-31 04:43:45

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Image borders in WordPress

I've been vexed by a little problem in WordPress. If I added the "border" class to an image in a post (using the WordPress Image Details editor) I would get a nice one pixel solid black border around the image, just as I expected.
But if I added a caption to the image, then the border image disappeared.
My solution was to go into the WordPress text editor and add the border back in using inline styling. Easy to do but still a pain in the ass.
So today I finally decided to fix this. All it took was to write a more specific css rule that would cover captioned images and add this rule to my custom css file. Not hard at all.
If anyone is interested, I've posted the how-to on my TTG-Tips site here: http://ttg-tips-and-tricks.barbeephoto. … wordpress/


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#2 2015-01-31 20:00:03

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 380
Website

Re: Image borders in WordPress

Thanks for this one Rod. I played with the caption/border business a while ago and gave up because of my tiny (but growing) knowledge of WordPress. Baby steps to big steps. Big steps to great leaps. Great leaps to falling off a cliff. At least that's how I do it.
Regards Mark

Offline

#3 2015-01-31 21:35:16

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 380
Website

Re: Image borders in WordPress

...so I did that. But it seems my custom.css file is not being seen in WordPress. I know this because I added the "page body red" trick to the custom.css and it doesn't happen. I export the TTG4 Them for wordpess from lightroom as a "child" theme in WP so I don't lose customizations I've made within WP whenever I upload a new version of the TTG4 theme. This has been working well for me. Phplugins is enabled and is controlling my site wide menu and my custom footer. Custom.css is enabled in the phplugins file.  What I'm wondering is why the custom.css isn't being seen? Seems that in WP, child themes are linked to the main theme by a style.css file that just provides a link to style.css in the child theme. Should I maybe also be providing a link to the custom.css? Like I said, WordPress is not my strong point.
Regards Mark

Offline

#4 2015-01-31 22:17:18

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Image borders in WordPress

The code to call custom css in phplugins assumes this location for your custom.css file:
/phplugins/css/custom.css. So if the css file isn't located there, then just change the path in the phplugins code.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2015-01-31 22:31:47

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 380
Website

Re: Image borders in WordPress

That's where the custom.css file is. But in relation to the server root it would be something like this: home/markho/public_html/blog.photophart.com/wp-content/themes/TTGCE4_WPBlog/phplugins/css/custom.css   Which I tried adding to phplugins custom css path. But that doesn't seem to work.

Offline

#6 2015-01-31 23:42:59

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Image borders in WordPress

It needs to be a url, not a server path


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2015-01-31 23:57:32

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Image borders in WordPress

in your case, it should probably look like this

    echo '
    <link rel="stylesheet" href="/WP-content/themes/TTGCE4_WPBlog/phplugins/css/custom.css" />
    ';

But, if you want to use custom css on the rest of your site, it would be easiest to simply place the phplugins/ folder in the root of the site. Then provide the server path to that location to all your TTG plugins.
Because if you ever remove or rename that theme, you'll lose your connection to phplugins.
Plus, having it in the root of the site just makes it easier to get to whenever you need to add or change stuff.

If you do move the phplugins/ folder, then just leave the url to the custom css file as /phplugins/css/custom.css


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

Board footer

Powered by FluxBB