Support » Plugin: Speed Contact Bar » Remove link phone and email link on desktop

  • Resolved stepheniryna

    (@stepheniryna)


    This plugin is the only one in the whole repository that really provides what I want. I do have a couple of issues though.

    It’s awesome that the phone and email icons work on mobile. But how can I remove the links on desktop? Those functions don’t work on desktop and can just confuse visitors.

    OR

    Even better, is there a way to remove the phone link on desktop and change the email link so that it goes to my contact page on desktop?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Martin Stehle

    (@hinjiriyo)

    Yes, the media queries in CSS fit perfectly for your first request. Add the code via a Custom CSS plugin or in the CSS file of your theme:

    /* to hide phone and email icons on desktops */
    @media screen and (min-width:1024px) {
    	#scb-phone, #scb-email {
    		display: none;
    	}
    }

    Your second request requires an “add-on” plugin for this plugin. It is tricky.

    masterwebsitedesigners

    (@masterwebsitedesigners)

    Thank you Martin

    When I click on the link for the email… it opens my gmail account… good, BUT instead of adding just the email, it adds the http:// with the email address.

    How can I remove the http:// from the command?

    Plugin Author Martin Stehle

    (@hinjiriyo)

    Maybe it is a Gmail issue? I don’t know since I don’t use Gmail.

    masterwebsitedesigners

    (@masterwebsitedesigners)

    Same happens with other emails, it populates the http:// then the email in the recipient field.

    Can you let me know which .php file this would be sitting in, and I’ll write something to exclude the http:// component

    Plugin Author Martin Stehle

    (@hinjiriyo)

    The string entered into the email field on the settings page of the plugin gets a “mailto:” prefix. Maybe did you use one of the URL fields for the email (silly question, I know, just to be sure)?

    You can take a look at the PHP file where that is sitting in: speed-contact-bar/public/class-speed-contact-bar.php, line 884.

    masterwebsitedesigners

    (@masterwebsitedesigners)

    this is line 884 for me

    masterwebsitedesigners

    (@masterwebsitedesigners)

    ` ‘<li id=”scb-email”><a href=”mailto:%s”><img src=”%sassets/images/email_%s.svg” width=”%d” height=”%d” alt=”%s” /><span>%s</span></a></li>’,

    Plugin Author Martin Stehle

    (@hinjiriyo)

    There you can see the “ā€¯mailto:” keyword before the placeholder of the mail address. So I can not understand what adds “http://” to the mail address. The plugin does not do that, so maybe Gmail?

    masterwebsitedesigners

    (@masterwebsitedesigners)

    yeah, the code looks fine… I have the same conclusion, I’ll need to figure out a way to exclude the http:// from being added (within this code) I just tried other links, as in manual hyperlinks with mailto: in a page and it works just fine…. so it definitely is something between this plugin and Gmail

    Plugin Author Martin Stehle

    (@hinjiriyo)

    The malformed output of the mail address is fixed in the new version 4.9.1. Thank you for pointing to that issue.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove link phone and email link on desktop’ is closed to new replies.