WordPress.org

Plugin Directory

Social Venues for Events Calendar Pro

Add social media profiles to venues in Events Calendar Pro. This plugin requires the Events Calendar Pro plugin by Modern Tribe.

Can I change where the icons appear on my venue pages?

Yes. The plugin automatically appends them to the end of the venue's description. If no description exists, it will append them to the title. However, you can attach them to any custom action hook with the following code:

/**
 * This function attaches social media icons after 
 * the venue meta data (address, phone, etc), using
 * a custom action hook that is part of the default
 * templates provided by Events Calendar Pro.
 */
function my_custom_profiles_hook( $custom_action ) {
    $custom_action = 'tribe_events_single_venue_after_the_meta';
}
add_filter( 'svecp_custom_action', 'my_custom_profiles_hook');

Can I add another social network or use different icons?

Yes! This plugin has hooks that will allow you to customize the services registered with this plugin. You'll need a little familiarity with PHP code and your theme's functions.php file.

Adding the following code to your theme's functions.php file would change the output of the Facebook icon to an image in your theme's directory:

/**
 * Use an image icon for the Facebook profile
 */
function my_modify_network_function( $services ) {

    $services['facebook']['html'] = '<img src="' . get_stylesheet_directory_uri() . '/img/icons/facebook.png">';

    return $services;

}
add_filter( 'svecp_services', 'my_modify_network_function' );

Of course, you'll need to have an image in your theme's directory, at `/img/icons/facebook.png', for this to display properly.

Adding another social network is just as easy:

/**
 * Add a new network to choose from when editing a venue
 */
function my_new_network_function( $services ) {

    $services['new_network'] = array(
        'label'               => __( 'My New Network', SVECP_TEXTDOMAIN ),
        'html'                => '<img src="/path/to/icon/image.png">'
    );

    return $services;

}
add_filter( 'svecp_services', 'my_new_network_function' );

If you don't want to use the Socicon font for icons, you can prevent the stylesheet from being loaded with the following code:

/**
 * Prevent FontAwesome stylesheet from loading
 */
function my_custom_stylesheets_function( $stylesheets ) {

    $new_stylesheets = array();
    foreach( $stylesheets as $stylesheet ) {
        if ( $stylesheet['handle'] != 'svecp-styles' ) {
            $new_stylesheets[] = $stylesheet;
        }
    }

    return $new_stylesheets;

}
add_filter( 'svecp_enqueue_stylesheets', 'my_custom_stylesheets_function' );

I'll be describing how to use this and other filters to customize this plugin more extensively in future blog posts. So look for news posts at Theme of the Crop, or follow me on Twitter and Google+.

I want more features

What do you want? I think this plugin works best if it's kept nice and simple, but if you've got other needs for your venues let me know. Maybe I can help.

Requires: 3.8 or higher
Compatible up to: 3.9.8
Last Updated: 2014-4-23
Active Installs: 80+

Ratings

0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1
100,1,1