This topic has 11 replies, 2 voices, and was last updated 7 years, 4 months ago ago by Rose Tyler
Hello,
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:
From:
<img src="<?php echo $hoverImg['url']; ?>"...
To:
<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…
Just noticed that my customizations are not good as it grabs the full size image instead of the shop catalog size…So any help how to fix this is a clean way would be perfect. Thank you.
Hello,
Unfortunately, it requests a lot of additional customization. You may contact WPKraken team to get help with additional customization.
Regards
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?
Many thanks!
This is so weird, it does the same here in this forum. I am typing an small “x” and after sending my message it shows this: ×
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..
I am not sure, but try to add \
before “x”
Regards
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?
Got it. Somehow my custom code to output the custom field was causing the x-transformation. Outputted it now as shortcode and that did the trick…
I’m glad that you sorted out.
Regards
You must be logged in to reply to this topic.Log in/Sign up