Knowledge Base

NS Basics

Basic Shortcodes

Basic Shortcodes

NS Basics comes with 23 shortcodes that you can use to quickly build robust pages. Shortcodes can be added to any content area of the theme. Below is a list of all the shortcodes and their parameters:

[ns_module]

Creates a module block which can be styled and hold other shortcodes and content.

Parameters:
class – the module class name.
container – wether to include content in container or not. Default: true
padding_top – the amount of padding above the module in pixels. Default: 70px
padding_bottom – the amount of padding below the module in pixels. Default: 70px
margin_top – the amount of margin above the module in pixels. Default: 0px
margin_bottom – the amount of margin below the module in pixels. Default: 0px
bg_color – the hexadecimal or rgb value of the background color.
bg_img – the url path for a background image.
bg_fixed – make the background image position fixed.
text_color – the hexadecimal or rgb value of the text color within the module.

Example:
[ns_module class="services" container="true"] /* content goes here */ [/ns_module]

[ns_module_header]

Displays a the header and sub-text of a module.

Parameters:
title – the module header title. Default: none
text – the text displayed below the title. Default: none
position – the positioning of the module header: center, left or right. Default: center

Example:
[ns_module_header title="Services" position="left"]

[ns_row]

Outputs a row block. Rows and columns are the building blocks for laying out page designs.

Parameters: none

Example:
[ns_row] /* row content goes here */ [/ns_row]

[ns_col]

Outputs a column block. Rows and columns are the building blocks for laying out page designs.

Parameters:
span – the width of the column. Choose a number between 1 and 12. Default: 4

Example:
[ns_col span="4"] /* column content goes here */ [/ns_col]

[ns_button]

Outputs a styled button.

Parameters:
url – the url that the button links to. Default: #
type – the button CSS class. Default: none
position – the horizontal position of the button. Cane be left, center, or right. Default: left

Example:
[ns_button url="https://www.google.com/" position="center"] /* button text goes here */ [/ns_button]

[ns_quote]

Outputs a blockquote element.

Parameters: none

Example:
[ns_quote] /* quote goes here */ [/ns_quote]

[ns_alert_box]

Outputs an alert box.

Parameters:
title – the alert box title. Default: none
type – the alert box type. Can be success, info, warning, or error. Default: success

Example:
[ns_alert_box title="This is a warning!" type="warning"] /* alert text goes here */ [/ns_alert_box]

[ns_service]

Outputs a service item block.

Parameters:
icon – the service font awesome icon class. Default: none
icon_line – the service linear icon class. Default: none
dripicon – the service dripicon icon class. Default: none
title – the service title. Default: none
text – the service text. Default: none

Example:
[ns_service icon="fa-user" title="Web Design"] /* service text goes here */ [/ns_service]

[ns_team_member]

Outputs a team member block.

Parameters:
img – path to the team member image url. Default: none
name – the team member’s name. Default: none
title – the team member’s professional title or position. Default: none
bio – the team member’s bio. Default: none
facebook – the team member’s Facebook url. Default: none
twitter – the team member’s Twitter url. Default: none
google – the team member’s Google Plus url. Default: none
instagram – the team member’s Instagram url. Default: none
linkedin – the team member’s Linkedin url. Default: none
youtube – the team member’s Youtube url. Default: none
flickr – the team member’s Flickr url. Default: none
dribbble – the team member’s Dribbble url. Default: none

Example:
[ns_team_member img="/path/to/img/" name="John Doe" title="Web Designer" bio="John Doe is a web designer from Baltimore, MD"]

[ns_video]

Outputs an embedded video block.

Parameters:
title – the video title. Default: none
url – url path to the video. Default: none
cover_img – url path to a video cover image. Default: none

Example:
[ns_video title="My Video" url="https://www.youtube.com/watch?v=yOvxSTLZt6g" cover_img="/path/to/img/"]

[ns_tabs]

Displays a tabs container.

Parameters: none

Example:
[ns_tabs] /* individual tabs go here */ [/ns_tabs]

[ns_tab]

Displays a tab. Must be used within the [ns_tabs] shortcode.

Parameters:
id – the id of the tab.
title – the title of the tab.
icon – the font awesome class for the tab icon.
icon_line – the linear icon class for the tab icon.
dripicon – the dripicon icon class for the tab icon.

Example:
[ns_tab id="1" title="Tab Title"] /* tab content goes here */ [/ns_tab]

[ns_accordions]

Displays an accordion container.

Parameters: none

Example:
[ns_accordions] /* individual accordion tabs go here */ [/ns_accordions]

[ns_accordion]

Displays an accordion tab. Must be used within the [ns_accordions] shortcode.

Parameters:
title – the title of the accordion tab.

Example:
[ns_accordion title="Accordion Tab Title"] /* accordion tab content goes here */ [/ns_accordion]

[ns_testimonials]

Displays a testimonials slider container.

Parameters: none

Example:
[ns_testimonials] /* individual testimonials go here */ [/ns_testimonials]

[ns_testimonial]

Displays a testimonial. Must be used within the [ns_testimonials] shortcode.

Parameters:
img – the url path to the testimonial image.
name – the testimonial name.
title – the professional title/position of the testimonial.

Example:
[ns_testimonial img="/path/to/img/" name="John Doe" title="Web Designer"] /* testimonial content goes here */ [/ns_testimonial]

[ns_list_posts]

Displays a list of blog posts.

Parameters:
num – the number of posts to display. Default: 3
excerpt – the number of words to display in each post excerpt. Default: 20

Example:
[ns_list_posts num="10"]

[ns_login_form]

Displays a user login form.

Parameters:
redirect – a url to redirect to after a successful login.

Example:
[ns_login_form]

[ns_register_form]

Displays a user register form.

Parameters:
role – which role to register the user as. Default: subscriber

Example:
[ns_register_form]

[ns_dashboard]

Displays a user dashboard.

Parameters: none

Example:
[ns_dashboard]

[ns_favorites]

Displays a list of user favorited posts.

Parameters:
show_posts – the number of posts to show. Default: 12

Example:
[ns_favorites]

[ns_edit_profile]

Displays an edit profile form.

Parameters: none

Example:
[ns_edit_profile]