The wp_connect_like_button_default function is a helper function to render a Facebook Like Button with default (currently set) setting values. Use this function is recommended only when there is no need to specify any options. See wp_connect_like_button for more information about the available settings.


<?php wp_connect_like_button_default( $href, $echo ); ?>


(string) (required). The URL to like.
Default: None. Pass an empty string for the current page.
(boolean) (optional) Whether to print the plugin code (TRUE) or return it as a PHP variable (FALSE).
Default: TRUE


if ( function_exists( 'wp_connect_like_button_default' ) ){

	$like_url = 'http://www.mysite.com/my-post';

	// render the like button in place
	wp_connect_like_button_default( $like_url );


Change Log

  • Since: 2.0
  • Since: 2.0.1 – Fixes the problem with api functions not defaulting to the current post/page url when an empty string is passed in as the url parameter

Source File

wp_connect_like_button_default() is located in wordpress-connect/wordpress-connect-functions.php.


wp_connect_activity_feed, wp_connect_comments, wp_connect_comments_default, wp_connect_facepile, wp_connect_like_box, wp_connect_like_button, wp_connect_live_stream, wp_connect_login_button, wp_connect_recommendations, wp_connect_send_button