Other Shortcodes

Google Maps

You can insert a Google map into your posts and pages.

[code][google_map src=”https://maps.google.com/maps?q=Boring,+oregon&hl=en&sll=37.666429,-103.798828&sspn=15.476189,20.192871&hnear=Boring,+Damascus,+Clackamas,+Oregon&t=m&z=13″][/code]

Parameters

width
(int) (Optional) The width of the map.
height
(int) (Optional) The height of the map.
src
(string) (Required) The link or embed SRC of a Google map.

[clear]
[clear]

Samples

[google_map width=”450″ height=”375″ src=”https://maps.google.com/maps?q=Boring,+oregon&hl=en&sll=37.666429,-103.798828&sspn=15.476189,20.192871&hnear=Boring,+Oregon&t=m&z=13″]

[code][google_map width=”450″ height=”375″ src=”https://maps.google.com/maps?q=Boring,+oregon&hl=en&sll=37.666429,-103.798828&sspn=15.476189,20.192871&hnear=Boring,+Damascus,+Clackamas,+Oregon&t=m&z=13″][/code]

[hr]

Breadcrumbs

You can insert breadcrumbs into your design using a shortcode with optional settings for controlling the navigation and display of the breadcrumb links.

[code][breadcrumbs][/code]

Parameters

home
(string) (Optional) The text to use for the home link.
blog
(string) (Optional) The title of the blog link when used in post paths.
sep
(string) (Optional) The separator between links. Default: “/”
blogpageid
(int) (Optional) The id of the page to use as the blog link in post paths.
prefix
(string) (Optional) Text to show before breadcrumbs, “You are here: “
archiveprefix
(string) (Optional) Archives page prefix text.
searchprefix
(string) (Optional) Search page prefix text.
boldlast
(bool) (Optional) Make the current page bold. Values: 1 (true) or 0 (false)
catinpostpath
(bool) (Optional) Show category in single post path. Values: 1 (true) or 0 (false)

[clear]
[clear]

Samples and Additional Information

[clear]
[clear]

[breadcrumbs boldlast=1]

[breadcrumbs boldlast=1]

[hr]

Sidebar Shortcode

Insert a sidebar using the shortcode. Sidebars are created using the Sidebar Generator in the theme options.

[code][sidebar alias=”sidebar-alias-name”][/code]

Parameters

alias
(string) The alias of the sidebar to be displayed.

[clear] [hr] [clear]

Static Content Blocks

Insert content from the static blocks custom post type directly into your site using a shortcode.

[code][static_content id=”featured-products”][/code]

Parameters

id
(string) or (int) The id or slug of the static block to be displayed.

[clear] [hr] [clear]

Members Only

Wrap content in the members only shortcode to hide it from public users.

[code][members_only]Content only visible to logged in users.[/members_only][/code]
[clear]

Show important side wide messages for your users while logged in.

[code][bp_notices][/code]
[clear]

Public Only

Wrap content in the public only shortcode to hide it from logged in users.

[code][public_only]Content only visible to public users.[/public_only][/code]
[clear]

More Shortcodes

Page Title

Can be used in header, footer, or the content area to display the current page title.
[code][page_title][/code]

Advanced Shortcodes

These shortcodes are designed for advanced users with a deep knowledge of WordPress.

Include Templates

Based on the WordPress function get_template_part() you can include any specific php file into the content. You can like that include php code inside your posts and pages, enhance the functionality without rewriting the theme or include buddypress functionality into your content.

[code][template_part slug=”template” name=”author”][/code]

Run Functions

If you need to run a given function in a post, you can do that with the following shortcode. It will use the php function call_user_func($func) to run it.

[code][fn function=”any_function_name”][/code]

You can also pass parameters to the function:

[code][fn function=”calculate” 4 3][/code]
This code would lead to a function call like:
[code]<?php calculate(4,3); ?>[/code]