Archived topic
Fixed Top Bar change CTA Desktop to Mobile
3 replies · Started by Jordi on October 11, 2020
Hi, I have a fixed top bar with a CTA button (Call now) but I want to change it for Desktop users to Contact Us (write a contact form) it's possible to do? Obviously maintaining the Call Now button only in Mobile.
Thank you!
Hi,
Can you link us to the site in question? So we could take a closer look and provide the proper code to address this issue.
Thank you. :)
Hi Elvin,
I attached the URL (private info). I have use this code
<p class="topbar-text">Top Bar Call to Action Click Here</p>
I understand need more code to change from desktop to mobile, can you hel me about this please?
Hi there,
you would need to add separate HTML for your Desktop and Mobile versions. You can add the hide-on-* CSS classes to each element:
https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
e.g your HTML could be this:
<p class="topbar-text hide-on-mobile">Top bar CTA for Desktop and tablet</p>
<p class="topbar-text hide-on-tablet hide-on-desktop">Top bar CTA for Mobile</p>