Hey Enfold-Team,
is there a possibility to add a CTA-Button only to the mobile menu?
The result should have a button like this: https://sfvoe.de/wp-content/uploads/2022/11/CTA-mobile.jpg
Thank you in advance!
Kind regards
Jonas
Hi Jonas,
The image you shared is not loading on my end, please try uploading it to a service like Snipboard or Imgur instead.
Best regards,
Rikard
Hi,
Thank you for the update.
You can add this code in the functions.php file to insert an element inside the header.
add_action('ava_main_header', function() {
$output = '<div class="av-cta-button av-desktop-hid av-tablet-hide av-button"><a href="#">Click Here</a></div>';
echo $output;
}, 10);
Then add this css code to adjust the style of the element.
.av-cta-button {
position: relative;
top: 10px;
right: 10px;
}
We already set the html above so that the button element is only visible on mobile view.
Best regards,
Ismael
Hey Ismael,
thank you very much for the quick response and the solution! Unfortunately the code in the functions.php causes the theme to crash. Might there be a mistake?
Kind regards
Jonas