-
-
Hi:
Still trying to trouble shoot this issue for my client. We are using the service media box to bring in images. Overall it works fine however, our images don’t need links and there seems to be no way to disable it. I tried going into the code and simply removing the “#” and deleting the link tag placeholder but that did not work.
So the unfortunate functionality is that if you click on the title of the image or the image itself the page refreshes and targets back up to the top which is very annoying. Is there any other way to disable this?
You can see the behavior here: https://aquaplaysolutions.com/spray-features
Is there a fix?
Thank you.
-
Hello,
Please go to file \vc_templates\services_media.php, and find these lines:
if($style == 'style_1'){ $output .= '<h5><a href="'.esc_url($link).'">'.esc_html($title).'</a></h5>'; $output .= '<p>'.do_shortcode($content).'</p>'; }
Replace with these:
if($style == 'style_1'){ $output .= '<h5>'.esc_html($title).'</h5>'; $output .= '<p>'.do_shortcode($content).'</p>'; }
Save file.
Best regards!
-
Hi Mihaila,
I had the same problem in my home page, so I modified the \vc_templates\services_media.php as you said above:
if($style == 'style_1'){ $output .= '<h5>'.esc_html($title).'</h5>'; $output .= '<p>'.do_shortcode($content).'</p>'; }
This solved the problem for the text link, but the images in my home page are still clickable, I am referring to these images in my home:
https://monosnap.com/file/ywQfYJqJcb5Wdqb2vfkWuS5upSUTZQ
they are still embedding a link, you can see if you mouse over.
How can I remove the image links?
Thankss
Home page: https://www.mybulgaria.it/
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
- This reply was modified 7 years ago by wally.
-
Hello,
The code line responsible for the images is this:
$output .= '<a href="'.esc_url($link).'"><div class="overlay">'; $output .= '<img src="'.esc_url($photo).'" alt="" />'; $output .= '<span></span>'; if($style == 'style_2') $output .= '<h5><a href="'.esc_url($link).'">'.esc_html($title).'</a></h5>'; $output .= '</div></a>';
To remove the link effect, edit the code above to this:
$output .= '<div class="overlay">'; $output .= '<img src="'.esc_url($photo).'" alt="" />'; $output .= '<span></span>'; if($style == 'style_2') $output .= '<h5><a href="'.esc_url($link).'">'.esc_html($title).'</a></h5>'; $output .= '</div>';
Save changes.
Best regards!
-
Is this an all or nothing fix?
What if I want some of the service media images to have links and be clickable and the ones that don’t have links remain unclickable?
-
Hello,
Sorry but that is not possible.
The services are controlled by one file therefore it’s not possible for only some of them to have a different behavior.Best regards!
-
You must be logged in to reply to this topic.