Support » Plugin: Floating Contact Button » on certain pages only?

  • Resolved WP-Henne

    (@wp-henne)


    Hi,

    i’d like to use this plugin only at member-sites, so it’s possible to by select user-role (ultimate member plugin) or pages-id, where the button is shown

    THX

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author cmsgeek

    (@cmsgeek)

    Hi @wp-henne ,

    the easiest way is to use costum css to make the button invisible and only visible on certain pages.

    
    .fcb-link-button {display:none;}
    .page-id-1 .fcb-link-button, .page-id-5 .fcb-link-button {display:block !important;}
    

    Best regards
    Chris

    Hello Chris,

    thank you, yes, this is one solution, but not safe while using a member-area. Because the form will be loaded at all public sites and this is a por solution.

    If found a way to protect the form from bots while using this encoder:
    https://wordpress.org/plugins/email-encoder-bundle/

    But a real filter per site would be the best way!

    Thank you!

    Plugin Author cmsgeek

    (@cmsgeek)

    Hi @wp-henne ,

    you’re right, that would be a bad solution. I hadn’t considered the membership site.

    If you add the following code (marked bold) to floating-contact.php:

    $fcb_shortcode = get_option( ‘fcb_options’ )[‘fcb_field_shortcode’];

    if ( is_page( ‘357’ )) {

    echo ‘ <i class=”fcb-icons”><span class=”dashicons dashicons-format-chat”></span></i>‘;
    echo ‘ <div id=”fcb-modal”> ‘;
    echo ‘ <div class=”fcb-modal-content”> ‘;
    echo ‘ <p>’.do_shortcode($fcb_shortcode).'</p>’;
    echo ‘ <div class=”fcb-footer”><div class=”fcb-footer-close”><span class=”fcb-close”>X</span></div></div></div>’;
    echo ‘ <div class=”overlay”></div> ‘;
    echo ‘ </div> ‘;
    }
    }

    then it should work. The number is the page ID.

    Best regards
    Chris

    • This reply was modified 7 months, 3 weeks ago by cmsgeek.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘on certain pages only?’ is closed to new replies.