Support » Plugin: WPAdverts - Classifieds Plugin » Need to hide email in “Show Contact Information”

  • Resolved carlopantaleo


    Hi! I’m using from a few days your plugin and the site is looking great.
    I just need a little information:
    How can I hide the email address in the “Show Contact Information” tab in the ad?
    There is a lot of people that want to show only their telephone number…
    Or better, could there be the possibility to choose if to show it or not in the account space?
    Waiting for your kind response.

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski


    Hi, to always hide the email address you would need to deregister default contact box and register your own which does not display email, the code below should do that

    add_action( "init", "my_remove_init", 1000);
    function my_remove_init() {
        remove_action('adverts_tpl_single_bottom', 'adverts_single_contact_information');
        add_action('adverts_tpl_single_bottom', 'my_adverts_single_contact_information');
    function my_adverts_single_contact_information( $post_id ) {
        <div class="adverts-single-actions">
            <a href="#" class="adverts-button adverts-show-contact" data-id="<?php echo $post_id ?>">
                <?php esc_html_e("Show Contact Information", "adverts") ?>
                <span class="adverts-icon-down-open"></span>
            <span class="adverts-loader adverts-icon-spinner animate-spin"></span>
        <div class="adverts-contact-box">
            <p class="adverts-contact-method">
                <span class="adverts-icon-phone adverts-contact-icon" title="<?php _e("Phone", "adverts") ?>"></span>
                <span class="adverts-contact-phone"></span>

    The code you can add in your theme functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘Need to hide email in “Show Contact Information”’ is closed to new replies.