Adding WhatsApp button with Customoziation

I have added the WhatsApp buttom and diplay in ad detail page.
I have customized the buttom with some CSS but I have one issue :
The buttom have white background what I don’t want. I want just to have the green background around the buttom and not the white one. See screenshot;

This is the code I use

/* Design du bouton sur WhatsApp */

.hp-listing__attribute--telephone
		a {
			color: white;     
			font-weight: bold;
			background-color: green;  
		}

This my website : AirPods dans le Bus 58 – Seet-Guiss

Please advice how to proceed ?

Thanks.

Hi! That is the listing view page primary attribute area. You can turn off it’s css style with this:

.hp-listing--view-page .hp-listing__attributes--primary {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
}

Thank a lot !
Can I ask support for this last request please ?
I have created a child theme to make some customization in the functions.php . I want to modify the translation of the “add listing buttom” .
=> This is the area where I try to modify the functions.php file

An this is the code I use :

<?php
/**
 * Recommended way to include parent theme styles.
 * (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
 *
 */  

add_action( 'wp_enqueue_scripts', 'child_listinghive_style' );
				function child_listinghive_style() {
					wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
					wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') );
				}

/**
 * Your code goes below.
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

// Ajouter le filtre
add_filter(
    'hivepress/listing/submit/listing-submit-link.php',
    function( $content ) {
        if ( get_option( 'hp_listing_enable_submission' ) ) {
            $content = '<button type="button" class="hp-menu__item hp-menu__item--listing-submit button button--secondary" data-component="link" data-url="' . esc_url( hivepress()->router->get_url( 'listing_submit_page' ) ) . '">
                <i class="hp-icon fas fa-plus"></i>
                <span>' . esc_html( "J'ai ramassé" ) . '</span>
            </button>';
        }
        return $content;
    }
);
?>

Please inform if this is the right way to modify the code .

Thank for you help.

This is my first time trying to modify the functions.php file

Hi again! You don’t need a php snippet to translate that button text. Just translate it with Loco Translate.
How to translate HivePress
P.S. Never use this in your functions.php-> defined( 'ABSPATH' ) || exit;

Thank a lot. I will use this plugin if ever I need to translate a lot of text !
Please can you just inform I am using the right way to modify the functions.php file in the child theme. I am trying to follow these instructions : How to override template parts - HivePress Help Center

I need to override somes sections of the templates in order to make others advanced customizations. I am wondering about the right ways to declare the path in the child theme.

Thank for your help.

Thanks.

Overriding a template, and using php snippets, are different. In the child theme’s functions.php file, you can insert snippets. There is a lot of official HivePress snippets >HERE< or you can make your own. If you use any snippets, never use: defined( ‘ABSPATH’ ) || exit; or php tags: “<?php" and "?>”
To override a template, look >THIS< topic, where you can see, how to override a specific file (user register link).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.