How can I add a new social network beyond those supported natively to a listing?

How Can We Help?
< Back
You are here:

Here is an example of doing so for Vkontakte (this code should be placed in your theme’s functions.php file):

add_filter('drts_social_medias', function($medias) {
    $medias['vkontakte'] = [
        'type' => 'textfield',
        'label' => 'VKontakte',
        'icon' => 'fab fa-vk',
        'default' => 'vkontakte',
        'placeholder' => 'Enter VKontakte username.',
    return $medias;
add_filter('drts_social_media_url', function($url, $name, $value) {
    if ($name === 'vkontakte') {
        $url = '' . $value;
    return $url;
}, 10, 3);
Previous Can one setup certain fields to show only for certain categories?
Next How can I have a listing description use some default text if the description is empty?
Table of Contents