WordPress.org

Plugin Directory

LCT Useful Shortcodes & Functions

Shortcodes & Functions that will help make your life easier.

Shortcodes & Functions that will help make your life easier.

Site URL Shortcode == [url_site]

Use this to get your site URL with a shortcode. EX: if your site was http://www.example.com/, then [url_site] would return http://www.example.com/

Theme URL Shortcode == [url_theme]

Use this to get the URL of your theme with a shortcode. This comes in handy when you want to add an image that is stored in your theme folder.

EX: if your site was http://www.example.com/ and your theme folder was my-theme, then [url_theme] would return http://www.example.com/wp-content/themes/my-theme

Upload folder URL Shortcode == [up]

Use this to get the URL of your uploads folder with a shortcode. This comes in handy when you want to add an image to a widget that is stored in your uploads folder.

EX: if your site was http://www.example.com/, then [up] would return http://www.example.com/wp-content/uploads

Upload folder Path Shortcode == [up_root]

Use this to get the path of your uploads folder with a shortcode. This comes in handy when you want to run file_exists function for an item that is stored in your uploads folder.

EX: if your site was http://www.example.com/ and you public_html folder was located at /home/mysite/public_html/, then [up_root] would return /home/mysite/public_html/wp-content/uploads

is_blog() Function

You can call this to check if the page you are on is a blogroll or single post.

Tel Link Shortcode

Syntax: [lct_tel_link phone='{REQUIRED, with formatting}' action='{defaults to "tel_link", but you can change it in the advanced options}' category='{defaults to "{pre} {phone} {post}", but you can change it in the advanced options}' class='{optional}' pre='{optional pre text}' post='{optional post text}' text='{optional link text override}'] converts to {pre} {phone} {post}

Examples: (Basic) [lct_tel_link phone='(970) 555-1234'] converts to (970) 555-1234

(Advanced) [lct_tel_link phone='(970) 555-1234' action='My Custom Action' category='Something_NOT_tel_link' class='button' pre='before number:' post='after the number.'] converts to before number: (970) 555-1234 after the number.

(Link Text Override) [lct_tel_link phone='(970) 555-1234' text='Link Text Here'] converts to Link Text Here

Requires: 4.0 or higher
Compatible up to: 4.4.2
Last Updated: 3 days ago
Active Installs: Less than 10

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.