prettyPhoto problem

Hi.
I migrated blog to Betheme, and now I have problem with images, because images open in a new window, not in the lightbox.
Is there any possibility to automatically display them all in the lightbox?
I have a lot of pictures and editing each and add it  class = "prettyPhoto" will take a lot of time

Comments

  • Hi,

    can you show us what you mean? What exactly you used? If prettyPhoto was working previously, after migrating should work as well so we do not understand what you did exactly and what does not work.

    Thanks!
  • No no :)
    I migrated from another theme...
    When i add image (add media, select many files, add), blog add default <a class="dt-single-image" href="http://xxx.jpg" data-dt-img-description=""><img class="aligncenter size-medium wp-image-636" src="xxx.jpg" alt="xxx" width="300" height="200" /></a> 
    and  prettyphoto don't work.

    When i try add singly and edit image (add class="prettyphoto" ) i have code:

    [caption id="attachment_635" align="aligncenter" width="300"]<a class="prettyphoto" href="http://xxx.jpg"><img class="wp-image-635 size-medium" src="http://xxx.jpg" alt="xxx" width="300" height="175" /></a> alternate [/caption] - and prettyphoto on this image works great.

    1. How to add all images with class="prettyphoto"  (or another way to enable lightbox)
    2.  How to change all old image clas to prettyphoto 
  • Ohh, ok. We understand now. So if you migrated from another theme, then you must add prettyphoto class for each item manually because there is no way to add them automatically.
  • Changing the 1000 photos will be challenging...

    How to add new images (example 10 images together) with class="prettyphoto"  (or another way to enable lightbox) ?
  • You can add them as wp gallery. More information about this you can read on https://codex.wordpress.org/The_WordPress_Gallery
  • i have at post/page:
    image
    text text text
    text text text
    Image
    Image
    text text text
    text text text
    and first i add all images (https://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages) together and later i add text.
    At last, i have code:
    <a class="dt-single-image" href="http://xxx.jpg" data-dt-img-description=""><img class="aligncenter size-medium wp-image-636" src="xxx.jpg" alt="xxx" width="300" height="200" /></a> 
    I don't need "dt-single-image" - i need default "prettyphoto" - I think so



  • So if you got something like this, you must add class="prettyphoto" only. This is the only solution if previously pages were made with html.
  • Ok, i test it. On new page, when i change to text version:
    <a href="xxx.png"><img class="aligncenter size-medium wp-image-687" src="xxx.png" alt="xxx" width="300" height="245" /></a>
    and prettyphoto don't works - image opens in this same window

  • If you want to open images in popup window, where is prettyphoto rel then? Please try below code instead:
    <a href="xxx.png" rel="prettyphoto"><img class="aligncenter size-medium wp-image-687" src="xxx.png" alt="xxx" width="300" height="245" /></a>
  • ok - tell me what add many images with "rel="prettyphoto" at once? 
    By default wordpress add without it
  • You can't do this. If you want to add them the way you mentioned above, you must do this manually.
  • OK, I give up.
    Lightbox Plus Colorbox installed and it works great out of the box
    Do you have a cool theme, fast support, but some of your solutions are inconveniences :)
    Thank you for your help
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.