Before
After
💡
Purpose:
This code snippet modifies the hyperlink embedded in the Groundhogg social proof popup. Specifically, it alters the default link that's presented when the Groundhogg plugin is white-labeled, i.e., rebranded for another company (in this case, "https://carfit-hamburg.de/go/social-proof-link-to-ikb").
💥
Note:
Before proceeding with the following steps, ensure you have a recent backup of the website. Directly editing PHP files may break the site if not done correctly. If you're unsure, please seek help from a professional or use a staging site to test changes first.
🗺️
Location:
Follow the steps below to locate the file where the PHP code modification needs to be performed:
Install the WP File Manager plugin (Plugin Link) on WordPress website.
Navigate to the WP File Manager
on your WordPress dashboard.
Click on the wp-content
folder to expand it.
Inside wp-content
, navigate to the plugins
folder.
In the plugins
folder, locate and open the groundhogg-proof
plugin folder.
Within the groundhogg-proof
folder, find and open the API
folder.
Inside the API
folder, you'll find the proof-api-v4.php
file.
Right-click on the proof-api-v4.php
file and select Code Editor
from the context menu.
Locate the section of the code where the $link variable is defined. Replace the code at line 120 with the provided PHP snippet code.
$link = is_white_labeled() ? "https://carfit-hamburg.de/go/social-proof-link-to-ikb" : add_query_arg( $link_atts, 'https://carfit-hamburg.de/go/social-proof-link-to-ikb' );
⭐
Special Notes:
This script checks if the Groundhogg plugin is white-labeled. If it is, the hyperlink is set to your custom link. If it isn't, the custom link is attached to the existing one.
Ensure the link URL points to an active page on your website. Double-check the URL for any typographical errors to prevent landing on a broken or non-existent page.
This code is added directly in the plugin's PHP file. It's important to be aware that updates to the plugin could remove this custom code. It's a good idea to keep a copy of this code and to check your customization after every plugin update to make sure it's still working.
This change is hard-coded, which means it cannot be modified from the WordPress dashboard. If you need to adjust it, you will have to change the code directly.
Don't forget to clear the cache on your site after you make changes to PHP files. Clearing the cache makes sure your changes take effect.