Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-17-2015, 08:30 AM   #1
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Where to edit styles for media - gallery in wordpress?

hey guys,
i was wonder..
what if i want to add my own style to photos inside wordpress posts?
no problem when i'm using standard html line:

<a href="image url"><img src"thumb url"></a>

with my style it will look like this:

<a href="image url" class="my style"><img src"thumb url"></a>

but what if all my posts are media - gallery like here:

[gallery link="file" ids="2269,2268,2267,2266,2265,2264,2263,2262"]

where can i add my styles there?
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 08:34 AM   #2
myleene
Confirmed User
 
Industry Role:
Join Date: Oct 2013
Location: Canada
Posts: 882
In the gallery plugin where it renders the images or in its css depending on what you want to do and which gallery you are using.
myleene is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 08:46 AM   #3
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
using standard one gallery which is built in wordpress.
do you know exactly where can i edit it?
if it would be plugin for gallery that i'm using i would normally go to plugins/edit but it's not so that's why i'm looking my way into it.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 09:29 AM   #4
myleene
Confirmed User
 
Industry Role:
Join Date: Oct 2013
Location: Canada
Posts: 882
Oh. I though you were using a WordPress gallery plugin like NextGen Gallery or Photo Gallery.

You'll need to do something like this then:
zurb foundation - Change Wordpress default gallery output - Stack Overflow

And you should do it in a child theme.
myleene is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 11:47 AM   #5
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
appears i'm to dumb to do this using code they are tweaking on the site you linked to.
so to add style - simple style to standard wordpress gallery i need to do this in functions.php in child theme of my WP?
can you show me a bit how to do this in functions and not to fuck it up?

not like i won't try myself but you can speed up if you know where to exactly i should paste my damn class="mystyle" (that's example ofc).

and thanks for trying help, appreciate.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 12:18 PM   #6
SlickTz
Registered User
 
Industry Role:
Join Date: May 2015
Location: The South
Posts: 10
Use a Child Theme

Quote:
Originally Posted by druid66 View Post
appears i'm to dumb to do this using code they are tweaking on the site you linked to.
so to add style - simple style to standard wordpress gallery i need to do this in functions.php in child theme of my WP?
can you show me a bit how to do this in functions and not to fuck it up?

not like i won't try myself but you can speed up if you know where to exactly i should paste my damn class="mystyle" (that's example ofc).

and thanks for trying help, appreciate.
You should probably set up a child theme. I use the WP plugin: One-click Child Theme

On the style sheet for your child theme, place your CSS code. Hope this helps.
SlickTz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 12:31 PM   #7
myleene
Confirmed User
 
Industry Role:
Join Date: Oct 2013
Location: Canada
Posts: 882
Quote:
Originally Posted by druid66 View Post
appears i'm to dumb to do this using code they are tweaking on the site you linked to.
so to add style - simple style to standard wordpress gallery i need to do this in functions.php in child theme of my WP?
can you show me a bit how to do this in functions and not to fuck it up?

not like i won't try myself but you can speed up if you know where to exactly i should paste my damn class="mystyle" (that's example ofc).

and thanks for trying help, appreciate.
It's advanced WordPress, it requires more than 5-10 minutes to achieve and it requires good understanding of your setup. I wouldn't try it directly on a live blog as it could break it.

Read this: https://codex.wordpress.org/Child_Themes

I could do it for you if you wish or tell you how it can be achieved based on your setup. Contact me.
myleene is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 01:15 PM   #8
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Quote:
Originally Posted by SlickTz View Post
You should probably set up a child theme. I use the WP plugin: One-click Child Theme

On the style sheet for your child theme, place your CSS code. Hope this helps.
i know i can setup my own theme, but i'm tweaking already good theme now i want photos to be displayed in the way i want it.

Myleene: pm sent, thanks.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 01:20 PM   #9
kristin
GOO!
 
Industry Role:
Join Date: Sep 2002
Location: Back Home : )
Posts: 9,768
Quote:
Originally Posted by SlickTz View Post
You should probably set up a child theme. I use the WP plugin: One-click Child Theme

On the style sheet for your child theme, place your CSS code. Hope this helps.
Thanks for that plugin.

I have two clients whose templates didn't have a child theme and I need to create it to do updates. Thanks!
__________________
Vacares rules.

"Usually only fat guys have the kind of knowledge and ability that Kristin has."
kristin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 01:42 PM   #10
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
fucking done it, google is the king ;)
thanks for all the helps guys, if anyone wanna know how to add style to href tag inside gallery, pm me.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 03:29 PM   #11
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,097
i know you already solved it, but every wordpress gallery starts with an ID with a class 'gallery'. You can simply override the default styles by adding a new style to your css file

.gallery a { } or gallery img { }

I do that and it does the job really good ;)

Hope it helps ;)
z
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 04:10 PM   #12
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
thanks for the tip.
this code added to functions.php solved my problem:

function my_get_attachment_link($html) { $postid = get_the_ID(); $html = str_replace('<a', '<a class="mystyle"', $html); return $html; } add_filter('wp_get_attachment_link', 'my_get_attachment_link', 10, 1);
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2015, 11:20 PM   #13
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
I hope you did that in a child theme or all of your changes go poof on an update.
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-18-2015, 12:05 AM   #14
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
ofc
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
add, posts, style, gallery, styles, wordpress, media, line, [gallery, html, link=file, inside, guys, hey, edit, photos, standard



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.