I created a custom cdn to deliver my images. All uploads are no longer located in the default wp-content/uploads folder but in media.mydomain.com. I updated the database and everything works fine – except the swap images on product archive page. Please find more details in private content as I dont want my domain or screenshots of my page to be public. Thank you.
I fixed it by changing the following code in content-product.php line 83:
<img src="<?php echo $hoverImg['url']; ?>"...
<img src="<?php echo apply_filters( 'the_content', get_post_meta( $post->ID, 'hover_img', true ) );?>"...
But thats weird. It should be possible without any customizations…
I wanted to solve this by adding link to the scaled image (media.mydomain.com/myimage-420×420.jpg) as hover image, but when I do this, the “x” in 420X420 is transformed in an “×” and that causes that the url doesnt work. This is a really weird behavior. Do you have any idea how to fix this x-issue?
I solved this by adding only “media.mydomain.com/myimage” (without .jpg) as hover image and then adding this code to content-product.php:
<img src="<?php echo apply_filters( 'the_content', get_post_meta( $post->ID, 'hover_img', true ) )."-420x420.jpg";?>"
I know that this is really bad coding, so if you have any idea why the “x” is tranformed, I would prefer to fix this and use the link to the scaled image instead. Thank you..
Thank you, but unfortunately the x is still transformed. Tried it with a big X but that did not help either (the big X is not transformed but it has to be a small x to work)…so weird, I really dont understand what happend here and would like to know if its theme related or not…will do some more tests but maybe you know another solution?
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.
The message was successfully sent
Your shopping cart is empty