Removing PrettyPhoto for the WP Thickbox

resolved (10 posts) (3 voices)

  1. RemoD
    Member

    How or better where can I remove the prettyPhoto script with all components from the site, including renaming the links for my personal use?

    Thanks Remo

    Posted 3 years ago #
  2. Ruderic
    Support

    Hello,

    In order to disable prettyPhoto, go to the theme folder and open the file "lib/scripts/custom.js". In line #75, you will find this code:

    jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
    	overlay_gallery: false, social_tools: '', 'theme': 'light_square' /* light_square / dark_rounded / light_square / dark_square / facebook */
    });

    Just delete that block of code. Now, you have to apply the new plugin. If you do not know how to do it, please provide us a link to the plugin's website and we will tell you how.

    Posted 3 years ago #
  3. RemoD
    Member

    Hey Ruderic,

    thanks for your answer.

    I removed the lines like you said. And I also find the header including of prettyphoto in lib/functions/scripts.php and removed the lines.

    But I don't need to apply another plugin. Thickbox is a standard plugin of wordpress and already included all the time. I just want to use this and need to change the link creating from <a rel="prettyphoto"></a> to <a class="thickbox">

    Where I can do this?
    Thanks for helping.

    Greets Remo

    Posted 3 years ago #
  4. Elliott
    Support

    Hello RemoD,

    Open up /wp-content/themes/awake/lib/shortcodes/15-portfolio.php and on line 247 you should see this,

    'class' => 'hover_fade_js',

    Change it like this,

    'class' => 'hover_fade_js thickbox',

    And do the same on line 567. This will add the "thickbox" class to your portfolio items. You may want to do the same thing in 17-frames.php and 18-images.php for the frame and fancy_image shortcodes.

    Posted 3 years ago #
  5. RemoD
    Member

    Hey Elliott,

    thanks for that idea.
    But I need the class="thickbox" in the <a>-tag, not in the <img>-tag. So I have to edit the 'link_class'. Unfortunetaly this gives a conflict with the class "blog_index_image_load" or "portfolio_img_load".

    I think there isn't any other solution for my problem, right?

    Greets Remo

    Posted 3 years ago #
  6. Elliott
    Support

    It gets added to the link, not the image. I just tested on my end and did not see any conflicts. Go ahead and try it out.

    Posted 3 years ago #
  7. RemoD
    Member

    Thanks Elliott,

    it works for me too. But I always get the thickbox class in the <img>-Tag. And there I don't get the function of the thickbox.
    I also can insert it in the <a>-Tag like I need it. But this will break the class with the loader image.

    May you can give me another workaround for this. It would be just enough to eliminate the image link in the single portfolio view. It's not needed to view that full size pic in prettyPhoto, thickbox or somewhere else. Just a stand alone showing image without a link, like the old inFocus portfolio image. That would be already enough...

    Is that possible kinda simply?

    Greets Remo

    Posted 3 years ago #
  8. Elliott
    Support

    I'm not sure what you mean by breaking the class RemoD. If you add "thickbox" to the links class it should display fine, I don't see anything wrong with it on my end.

    For thickbox to work I believe you just need to add the class "thickbox" to your links, not the images. Are you sure you are loading thickbox correctly? Even though Wordpress includes it within the JS folder I believe you still need to reference it.

    Posted 3 years ago #
  9. RemoD
    Member

    Yes, I'm sure it is loaded correctly and it is referenced already, because I use it for the ngg gallery too. And it works perfectly.

    I'm sorry that I may described my problem too inexactly.
    I have forgotten to tell you that the images in the portfolio index - in the coloumns - should link the portfolio items. For this option I can't use the thickbox class. And the image in the single portfolio should just stand without linking or linking with the thickbox class in the a-tag.

    May that helps you more to understand me. :/

    Greets Remo

    Posted 3 years ago #
  10. Elliott
    Support

    It would probably be best if you created your images manually RemoD.

    For example if you wanted to create a frame image then you would do this,

    <a href = '#' class = 'thickbox'>
    <img class = 'framed' src = '#' />
    </a>

    And then you can customize / add whatever classes you need.

    Posted 3 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme