How does it is the prettyPhoto, by default prettyPhoto shows the “alt” as title and the “image title” as description.
Thread Starter
toad78
(@toad78)
Thank you, Mr. Sanches.
So now that has been established, is there any workaround to modifying the plugin without having it overridden on updates? Or shall I just block this specific plugin from being updated after I modify it?
Well you can remove the prettyPhoto and add a new lightbox jQuery plugin that you prefer.
You can remove using this code:
function my_custom_scripts() {
wp_dequeue_script( 'prettyPhoto-init' );
}
add_action( 'wp_enqueue_scripts', 'my_custom_scripts', 100 );
Thread Starter
toad78
(@toad78)
Unfortunately, that isn’t an option. The PrettyPhoto works very well for our purposes with the exception of the alt tag needing replacement.
Wait for 2.6 – titles/alt tags have been adjusted. otherwise you need to do template overrides yourself.
Thread Starter
toad78
(@toad78)
Is there an ETA on 2.6?
If not, how can I modify the jquery.PrettyPhoto.js to make the adjustments I need? I’m a newb at jQuery, so a solution would be helpful.
I plan on making my own version of the jquery.PrettyPhoto.js for my own theme, so I can preserve the original for updates.
Thank you.
Thread Starter
toad78
(@toad78)
Any update? Or should I be looking for another plugin?
Update? It’s already out…
Feel free to customise it if it’s not suitable. The template files which control titles etc can be overridden.
See https://docs.woothemes.com/document/template-structure/
Thread Starter
toad78
(@toad78)
I guess I’m not getting the full picture.
Mike Jolley, you mentioned
“Wait for 2.6 – titles/alt tags have been adjusted. otherwise you need to do template overrides yourself.”
Then I asked for an ETA. You said
“Tuesday :)”
So is there an update or not?
If not, then I’m a bit lost on WHERE I need to modify the WooCommerce plugin so I can get the ‘Title’ to post on the top of the image when it pops-up in the Lightbox.
2.6 was released today, so yes there was an update.
This template outputs the title/alt tags for the single image if you want to make further tweaks https://github.com/woothemes/woocommerce/blob/e39274e75391a186413da0bc5c217fa4c8bf2885/templates/single-product/product-image.php
Thread Starter
toad78
(@toad78)
Thank you, Mike.
Unfortunately, this did not ‘fix’ the issue I’m having. I still see the ‘Alt’ text at the top of the image and NOT the TITLE as I’m trying to accomplish.
Thread Starter
toad78
(@toad78)
That does nothing.
Please look on this page: http://www.tempest.us.com/product/shadow-blackout/
Click on the product image (the large one).
The ALT tag on top should be a TITLE, not an alt. Therefore, where in WooCommerce do I edit to post the TITLE of the image (from the image’s meta) there?!
Apparently its a prettyphoto thing to show alt there. I look forward to replacing PrettyPhoto with something else.
For now https://github.com/woothemes/woocommerce/blob/e39274e75391a186413da0bc5c217fa4c8bf2885/templates/single-product/product-image.php#L31-L34 as I said can be swapped round or you can set both to the TITLE. There is no way to make prettyphoto show the title instead of alt I can see without editing the actual prettyphoto scripts, which is something not advisable.