# Click-to-Call Bar on Mobile

> Shows a full-width "Call us now" bar fixed to the bottom of the screen on phones, so mobile visitors can call your business with one tap.

- Type: PHP
- Runs: Frontend only
- Category: [Frontend & Design](https://wpide.com/library/category/frontend/)
- Tags: mobile, phone, contact, conversion
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/frontend-mobile-call-bar/

## Code

```php
add_action( 'wp_footer', function () {
    $phone = '';             // For example '+1 555 010 0000'.
    $label = 'Call us now';

    if ( '' === trim( $phone ) ) {
        return;
    }

    printf(
        '<a class="wpide-call-bar" href="%1$s">&#128222; %2$s</a><style>.wpide-call-bar{display:none;}@media (max-width:767px){.wpide-call-bar{display:block;position:fixed;left:0;right:0;bottom:0;z-index:9999;padding:14px;background:#00a32a;color:#fff !important;text-align:center;font-weight:600;text-decoration:none;}body{padding-bottom:52px;}}</style>',
        esc_url( 'tel:' . preg_replace( '/[^0-9+]/', '', $phone ) ),
        esc_html( $label )
    );
} );
```

## Notes

Set $phone and $label. The bar only appears on screens narrower than 768px.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Click-to-Call Bar on Mobile" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
