Home Blog Add a LinkedIn Personal Profile Widget To WordPress With Shortcode

Add a LinkedIn Personal Profile Widget To WordPress With Shortcode

0

LinkedIn provide an online tool to generate a profile widget for use on your website. While not commonly used, we’ve seen it convert well in professional circles. The code in this article will provide the necessary shortcode to embed the Widget into a WordPress post or page. There are three primary types of Widgets: an inline widget, icon with name, and icon. Our shortcode provides for all three.

An article to follow shows how to embed the company widget into your WordPress website in a similar manner.

The Result

The result of the primary profile widget is as follows. Shortcode used is [linkedpersonal style="1"]. The style=”1″ forces the container to be centered. No attributes are defined since they’re included in the shortcode function.

To align the container within text, use [linkedpersonal style="1" align="right"] (or left).

The inline icon format is useful when referencing an individual in text. For example, the shortcode of [linkedpersonal type="icon"] returns . Hover over the icon and my personal profile container will be returned to the screen. The same inline inclusion can be used with the icon and name format. Shortcode of [linkedpersonal type="iconname"] returns: . By default no styling is applied. You can force alignment and padding by simply adding style=”1″.

WordPress Shortcode

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

If you require shortcode to work in a sidebar widget, you'll have to enable the functionality with a filter. If you're using our custom functions plugin, you'll have that feature enabled by default.

Shortcode Attributes

The following shortcode attributes are available.

profile

The default vanity username or user ID.

name

The default user’s name.

type

The type may be inline, iconname, or icon as demonstrated above.

format

The format determines if a hover or click is required to return the profile badge. By default we use hover. Use format=”click” to alter.

style

By default no styling is applied. Use style=”1″ to apply styles.

padding

If styling is true, the default padding of 8px 15px 15px 15px is applied. Alter as required.

align

By default we’ll center all profile badges when styling is applied. Alter as required.

Download

Title: LinkedIn Personal Profile Widget in WordPress
Description: Add a LinkedIn personal profile widget to WordPress with shortcode. Returns either the inline, icon, or icon & name widget.
Download: Shortcode (V0.1) | | Plugin Page

Shortt URL for this post: http://shor.tt/Icj

LEAVE A REPLY

Please enter your comment!
Please enter your name here