Join

Add More Social Network Options to MyListing

Don't want to mess with code snippets? Request for this to be a feature of MyListing Pro.

Instructions

  1. Create a new PHP code snippet.
  2. Copy the contents of code snippet below.
  3. Paste the contents into your code snippet.
  4. Review any notes that I’ve provided.
  5. Save and enable the code snippet.
  6. Test.

Snippet

Slack

add_filter( 'mylisting\links-list', function( $links ) {

    $links['Slack'] = [
        'name' => 'Slack',
        'key' => 'Slack',
        'icon' => 'fab fa-slack',
        'color' => '#fff',
    ];

    return $links;
} );

Threads

add_filter( 'mylisting\links-list', function( $links ) {

    $links['Threads'] = [
        'name' => 'Threads',
        'key' => 'Threads',
        'icon' => 'fab fa-threads',
        'color' => '#fff',
    ];

    return $links;
} );

TikTok

add_filter( 'mylisting\links-list', function( $links ) {

    $links['TikTok'] = [
        'name' => 'TikTok',
        'key' => 'TikTok',
        'icon' => 'fab fa-tiktok',
        'color' => '#128c7e',
    ];

    return $links;
} );

Discord

add_filter( 'mylisting\links-list', function( $links ) {

    $links['Discord'] = [
        'name' => 'Discord',
        'key' => 'Discord',
        'icon' => 'fab fa-discord',
        'color' => '#7289d9',
    ];

    return $links;
} );

Goodreads

add_filter( 'mylisting\links-list', function( $links ) {

    $links['Goodreads'] = [
        'name' => 'Goodreads',
        'key' => 'Goodreads',
        'icon' => 'fab fa-goodreads-g',
        'color' => '#9c7c1c',
    ];

    return $links;
} );