Ultra Companion Shortcodes

Below, you’ll find a detailed guide on how to add the Ultra Companion Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Ultra Companion Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Ultra Companion Plugin and the shortcodes it provides:

✩✩✩✩✩ () Active Installs: + Tested with: PHP Version:
Included Shortcodes:

Ultra Companion [ultra_social] Shortcode

The ‘ultra_social’ shortcode is a powerful tool for integrating social media links in your WordPress site. It dynamically generates clickable icons for various platforms. Upon execution, it extracts attributes like ‘facebook’, ‘twitter’, etc. The function then creates a div class, where it checks each social media attribute. If a link is provided, it creates an icon linking to that URL.

Shortcode: [ultra_social]

Parameters

Here is a list of all possible ultra_social shortcode parameters and attributes:

  • facebook – link to your Facebook profile
  • twitter – link to your Twitter profile
  • gplus – link to your Google+ profile
  • skype – link to your Skype profile
  • linkedin – link to your LinkedIn profile
  • youtube – link to your YouTube channel
  • dribble – link to your Dribbble profile

Examples and Usage

Basic example – A simple usage of the ‘ultra_social’ shortcode to display a Facebook social media link.

[ultra_social facebook="https://www.facebook.com/yourpage" /]

Advanced examples

Using the ‘ultra_social’ shortcode to display multiple social media links, such as Facebook, Twitter, and LinkedIn.

[ultra_social facebook="https://www.facebook.com/yourpage" twitter="https://twitter.com/youraccount" linkedin="https://www.linkedin.com/in/yourprofile" /]

Using the ‘ultra_social’ shortcode to display all available social media links, including Facebook, Twitter, Google Plus, Skype, LinkedIn, YouTube, and Dribble.

[ultra_social facebook="https://www.facebook.com/yourpage" twitter="https://twitter.com/youraccount" gplus="https://plus.google.com/youraccount" skype="skype:youraccount?call" linkedin="https://www.linkedin.com/in/yourprofile" youtube="https://www.youtube.com/channel/yourchannel" dribble="https://dribbble.com/youraccount" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_social] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_social', 'ultra_social_shortcodes');

Shortcode PHP function:

                    function ultra_social_shortcodes($atts){
	extract(shortcode_atts( 
		array(
			'facebook' => '',
			'twitter' => '',
			'gplus' => '',
			'skype' => '',
			'linkedin' => '',
			'youtube' => '',
			'dribble' => ''
			), $atts, 'ultra_social'));

	$social = '<div class="social-shortcode">';
	if($facebook){
	$social .= '<a href="'.esc_url($facebook).'" class="fb-icon" target="_blank"><i class="fa fa-facebook"></i></a>';
	}
	if($twitter){
	$social .= '<a href="'.esc_url($twitter).'" class="twitter-icon" target="_blank"><i class="fa fa-twitter"></i></a>';
	}
	if($gplus){
	$social .= '<a href="'.esc_url($gplus).'" class="google-icon" target="_blank"><i class="fa fa-google"></i></a>';
	}
	if($skype){
	$social .= '<a href="'.esc_url($skype).'" class="skype-icon" target="_blank"><i class="fa fa-skype"></i></a>';
	}
	if($linkedin){
	$social .= '<a href="'.esc_url($linkedin).'" class="linkedin-icon"  target="_blank"><i class="fa fa-linkedin"></i></a>';
	}
	if($youtube){
	$social .= '<a href="'.esc_url($youtube).'" class="youtube-icon" target="_blank"><i class="fa fa-youtube-play"></i></a>';
	}
	if($dribble){
	$social .= '<a href="'.esc_url($dribble).'" class="dribbble-icon" target="_blank"><i class="fa fa-dribbble"></i></a>';
	}
	$social .='</div>';
	return $social;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_accordian] Shortcode

The Ultra Accordion shortcode is a powerful tool that allows you to create a collapsible accordion feature on your website. The shortcode accepts two parameters: ‘title’ and ‘icon’. The ‘title’ parameter allows you to set the title of the accordion while the ‘icon’ parameter lets you add an icon alongside the title. The content within the accordion is determined by the ‘content’ parameter. This shortcode is highly versatile and can enhance the user experience on your website.

Shortcode: [ultra_accordian]

Parameters

Here is a list of all possible ultra_accordian shortcode parameters and attributes:

  • title – Specifies the heading of the accordion section.
  • icon – Sets the icon that displays next to the accordion title.

Examples and Usage

Basic example – Implements the ultra_accordian shortcode with a simple title attribute.

[ultra_accordian title="My Title" /]

Advanced examples

Using the ultra_accordian shortcode to create an accordion with a specific title and an icon from Font Awesome. The icon will be displayed next to the title in the accordion header.

[ultra_accordian title="My Title" icon="fa-user" /]

Using the ultra_accordian shortcode to create an accordion without a title, but with an icon. The icon will be displayed in the accordion header.

[ultra_accordian icon="fa-envelope" /]

Using the ultra_accordian shortcode without any attributes. This will create an accordion with a blank title and no icon.

[ultra_accordian /]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_accordian] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_accordian', 'ultra_accordian_shortcode');

Shortcode PHP function:

                    function ultra_accordian_shortcode($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'title' => '',
			'icon' => '',
			), $atts, 'ultra_accordian'));

	if($icon){
		$icon = '<i class="fa '.$icon.'"></i>';
	}
	$accordion = '<div class="ultra_accordian">';
	$accordion .='<div class="ultra_accordian_title">'.$icon.' '.$title.'</div>';
	$accordion .='<div class="ultra_accordian_content">'.ultra_content_helper($content).'</div>';
	$accordion .='</div>';
	return $accordion;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_accordian_wrap] Shortcode

The ‘Ultra Accordian Wrap’ shortcode is a part of the Ultra Companion plugin. It creates an accordion-style content wrapper, allowing for clean, organized display of information. The shortcode accepts a class attribute, which can be used to apply custom styling. The wrapped content is processed through the ‘ultra_content_helper’ function, ensuring proper formatting. Shortcode: [ultra_accordian_wrap class=”your_class”]Your Content[/ultra_accordian_wrap]

Shortcode: [ultra_accordian_wrap]

Parameters

Here is a list of all possible ultra_accordian_wrap shortcode parameters and attributes:

  • class – specifies the CSS class for the accordion wrapper

Examples and Usage

Basic example – The following shortcode utilizes the ‘ultra_accordian_wrap’ shortcode to create an accordion structure without any additional classes.

[ultra_accordian_wrap][/ultra_accordian_wrap]

Advanced examples

Example 1 – This shortcode adds a custom CSS class to the accordion structure. By adding ‘my-custom-class’ as a parameter, you can apply unique styling rules to this specific accordion.

[ultra_accordian_wrap class='my-custom-class'][/ultra_accordian_wrap]

Example 2 – This shortcode demonstrates the use of multiple classes within the ‘ultra_accordian_wrap’ shortcode. By separating class names with a space (‘ ‘), you can apply multiple CSS classes to the accordion structure.

[ultra_accordian_wrap class='class-one class-two class-three'][/ultra_accordian_wrap]
Remember, these additional classes must be defined in your site’s CSS for them to have any effect on the appearance of the accordion.

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_accordian_wrap] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_accordian_wrap', 'ultra_accordian_shortcode_wrap');

Shortcode PHP function:

                    function ultra_accordian_shortcode_wrap($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'class' => '',
			), $atts, 'ultra_accordian_wrap'));
	return '<div class="accordion-wrap '.$class.'">'.ultra_content_helper($content).'</div>';
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_toggle] Shortcode

The Ultra Toggle shortcode is a dynamic tool for managing content visibility. It allows you to create collapsible content panels. The shortcode takes two parameters: ‘title’ and ‘status’. ‘Title’ defines the heading of the panel, while ‘status’ controls whether the panel is open or closed by default. The ‘ultra_toggle_shortcode’ function extracts these parameters, generates the HTML structure for the toggle panel, and returns it. The ‘ultra_content_helper’ function is used to parse the nested content. In summary, this shortcode provides a simple and effective way to manage the display of your content, enhancing the user experience on your WordPress site.

Shortcode: [ultra_toggle]

Parameters

Here is a list of all possible ultra_toggle shortcode parameters and attributes:

  • title – The text that will appear as the toggle’s title
  • status – Determines if the toggle is open or closed by default

Examples and Usage

Basic example – A simple toggle shortcode with a title and default closed status

[ultra_toggle title="My Title" /]

Advanced examples

Here, we use the shortcode to create a toggle element with a title and an open status. The content inside the toggle will be visible by default.

[ultra_toggle title="My Title" status="open"]This is some content inside the toggle.[/ultra_toggle]

In the next example, we use the shortcode to create a toggle element with a title and a closed status. The content inside the toggle will be hidden by default. The content is also wrapped inside paragraph tags to ensure proper formatting.

[ultra_toggle title="My Title" status="close"]

This is some content inside the toggle.

[/ultra_toggle]

Lastly, we use the shortcode to create a toggle element without a title and a closed status. The content inside the toggle will be hidden by default.

[ultra_toggle status="close"]

This is some content inside the toggle.

[/ultra_toggle]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_toggle] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_toggle', 'ultra_toggle_shortcode');

Shortcode PHP function:

                    function ultra_toggle_shortcode($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'title' => '',
			'status' => 'close'
			), $atts, 'ultra_toggle'));
	$style = '';
	if($status == 'close') {
		$style = 'style="display: none;"';
	}
	$accordion = '<div class="ultra_toggle '.$status.'">';
	$accordion .='<div class="ultra_toggle_title">'.$title.'</div>';
	$accordion .='<div class="ultra_toggle_content" '.$style.'>'.ultra_content_helper($content).'</div>';
	$accordion .='</div>';
	return $accordion;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_drop_cap] Shortcode

The Ultra Drop Cap shortcode is a versatile tool for enhancing typography. It allows the first letter of a text block to be enlarged, creating a ‘drop cap’ effect. This shortcode accepts a ‘font_size’ attribute, to customize the size of the drop cap. The default size is 26px. By inserting content within the shortcode, you can apply the effect to any text.

Shortcode: [ultra_drop_cap]

Parameters

Here is a list of all possible ultra_drop_cap shortcode parameters and attributes:

  • font_size – Defines the font size for the drop cap text

Examples and Usage

Basic example – The basic usage of the ‘ultra_drop_cap’ shortcode allows you to add a drop cap to your content with a specific font size.

[ultra_drop_cap font_size=26]T[/ultra_drop_cap]

Advanced examples

By manipulating the ‘font_size’ attribute, you can create drop caps of varying sizes. This allows for a more dynamic and visually interesting layout. For instance, you might want a larger drop cap at the start of a section, and smaller ones for subsequent paragraphs.

[ultra_drop_cap font_size=36]T[/ultra_drop_cap]

Or, you might want a smaller drop cap for a less dramatic effect.

[ultra_drop_cap font_size=16]T[/ultra_drop_cap]

Remember that the ‘font_size’ attribute accepts any integer value, so you have complete control over the size of your drop caps.

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_drop_cap] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_drop_cap', 'ultra_drop_cap_shortcode');

Shortcode PHP function:

                    function ultra_drop_cap_shortcode($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'font_size' => '26',
			), $atts, 'ultra_drop_cap'));

	$drop_cap = '<span class="ultra_drop_cap" style="font-size:'.$font_size.'px">';
	$drop_cap .= $content;
	$drop_cap .='</span>';
	return $drop_cap;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_slide] Shortcode

The Ultra Slide shortcode is a powerful tool for displaying images on your WordPress site. It allows you to create a sliding image with optional captions and links. This shortcode takes parameters like ‘item’, ‘autoplay’, ‘caption’, ‘link’, and ‘target’. ‘Item’ specifies the number of slides, ‘autoplay’ enables automatic sliding, ‘caption’ adds text to images, ‘link’ provides a URL to be redirected to when clicked, and ‘target’ determines how the link opens. The PHP function ‘ultra_slide_shortcode’ extracts these attributes, constructs an HTML string with a div class of ‘ultra-slide’, and returns it. The resulting div can contain a linked image with a title (caption).

Shortcode: [ultra_slide]

Parameters

Here is a list of all possible ultra_slide shortcode parameters and attributes:

  • item – Defines the number of items to display in the slide.
  • autoplay – Decides whether the slide should play automatically.
  • caption – Sets the title for the image in the slide.
  • link – Provides a URL where the slide will redirect upon clicking.
  • target – Determines how the link will open: in the same or a new window.

Examples and Usage

Basic example – A simple usage of the ‘ultra_slide’ shortcode with a single image.

[ultra_slide item="1" caption="This is a caption" link="https://example.com" target="_self"]https://example.com/image.jpg[/ultra_slide]

Advanced examples

Utilizing the ‘ultra_slide’ shortcode with multiple parameters. This instance includes an image with a caption, a hyperlink, and an autoplay feature.

[ultra_slide item="1" autoplay="true" caption="This is a caption" link="https://example.com" target="_self"]https://example.com/image.jpg[/ultra_slide]

Another advanced usage of the ‘ultra_slide’ shortcode. This example includes an image without a caption, a hyperlink, and the autoplay feature turned off.

[ultra_slide item="1" autoplay="false" link="https://example.com" target="_self"]https://example.com/image.jpg[/ultra_slide]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_slide] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_slide', 'ultra_slide_shortcode');

Shortcode PHP function:

                    function ultra_slide_shortcode($atts, $content=null){

	extract(shortcode_atts( 
		array(
			'item' => '1',
			'autoplay' => 'true',
			'caption' => '',
			'link' => '#',
			'target' => '_self'
			), $atts, 'ultra_slide'));
	$ultra_slide = '<div class="ultra-slide">';
	if($link):
	$ultra_slide .= '<a href="'.$link.'" target="'.$target.'">';
	endif;
	$ultra_slide .= '<img title="'.$caption.'" src="'.$content.'">';
	if($link):
	$ultra_slide .= '</a>';
	endif;
	$ultra_slide .= '</div>';
	return $ultra_slide;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_slider] Shortcode

The Ultra Slider shortcode is a powerful tool for adding dynamic slide shows to your WordPress site. Using this shortcode, you can control the number of items displayed and set autoplay features. By enqueuing slick styles and scripts, it allows seamless integration of the slick carousel into your website. The shortcode wraps the content within a slider div, enabling a visually appealing presentation of your content.

Shortcode: [ultra_slider]

Parameters

Here is a list of all possible ultra_slider shortcode parameters and attributes:

  • item – Number of slides to show at the same time.
  • autoplay – Determines whether the slides play automatically or not.

Examples and Usage

Basic example – The following shortcode example would display a single slide that does not auto-play.

[ultra_slider item=1 autoplay=false /]

Advanced examples

Below is an example of how to use the shortcode to create an auto-playing slider with 3 items.

[ultra_slider item=3 autoplay=true /]

Also, you can use the shortcode to create a non-auto-playing slider with 5 items. If the autoplay parameter is not found, it will default to ‘true’.

[ultra_slider item=5 /]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_slider] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_slider', 'ultra_slider_shortcode');

Shortcode PHP function:

                    function ultra_slider_shortcode($atts, $content=null){
	wp_enqueue_style('slick');
	wp_enqueue_style('slick-theme');
	wp_enqueue_script('slick');
	extract(shortcode_atts( 
		array(
			'item' => '1',
			'autoplay' => 'true',
			), $atts, 'ultra_slide'));
	$ultra_slider = '<div class="shortcode-slider"><div class="slide_wrap" data-slick=\' { "slidesToShow": '.$item.', "autoplay": '.$autoplay.'}\' >';
	$ultra_slider .= ultra_content_helper($content);
	$ultra_slider .= '</div></div>';
	return $ultra_slider;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_tab] Shortcode

The Ultra Tab shortcode is a dynamic tool that helps create a tabbed layout in WordPress. This shortcode takes a ‘title’ parameter, which is used to label the tab. The content within the tab is passed through the ‘ultra_content_helper’ function, ensuring it’s displayed correctly. Any text within the shortcode tags in the editor will appear within the tab on the website. It’s a simple, effective way to organize your content.

Shortcode: [ultra_tab]

Parameters

Here is a list of all possible ultra_tab shortcode parameters and attributes:

  • title – Defines the name displayed on the tab header.

Examples and Usage

Basic example – The following shortcode uses the ‘ultra_tab’ shortcode to create a tab with a specified title. The title attribute is used to define the name of the tab.

[ultra_tab title="Home"]

Advanced examples

Creating multiple tabs with different titles using the ‘ultra_tab’ shortcode. Each shortcode represents a separate tab with its own title. These tabs can be used to categorize or organize content on your WordPress site.

[ultra_tab title="Home"]
[ultra_tab title="About Us"]
[ultra_tab title="Services"]
[ultra_tab title="Contact Us"]

Adding content to the tabs. Here, we’re using the ‘ultra_tab’ shortcode to create a tab with a title and content. The content within the shortcode tags will be displayed within the tab.

[ultra_tab title="Home"]Welcome to our homepage! Here you can find the latest updates and news.[/ultra_tab]
[ultra_tab title="About Us"]We are a company dedicated to providing the best service to our customers.[/ultra_tab]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_tab] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_tab', 'ultra_tab_shortcode');

Shortcode PHP function:

                    function ultra_tab_shortcode($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'title' => '',
			), $atts, 'ultra_tab'));

	$ultra_tab ='<div class="ultra_tab '.sanitize_title($title).'">';
	$ultra_tab .='<div class="tab-title" id="'.sanitize_title($title).'">'.$title.'</div>';
	$ultra_tab .= ultra_content_helper($content);
	$ultra_tab .='</div>';
	return $ultra_tab;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_tab_group] Shortcode

The Ultra Tab Group shortcode is a versatile tool for WordPress users. It enables you to create a tabbed content layout with customizable orientations. This shortcode extracts attributes to determine the tab type – either horizontal or vertical. It then wraps the content within a div with a unique class, allowing for stylization and layout control.

Shortcode: [ultra_tab_group]

Parameters

Here is a list of all possible ultra_tab_group shortcode parameters and attributes:

  • type – determines the orientation of the tab group
The ‘type’ parameter in the ‘ultra_tab_group’ shortcode allows you to set the orientation of the tab group. It can take two possible values:
  • horizontal – tabs are displayed in a row
  • vertical – tabs are displayed in a column
If you do not specify a ‘type’, the tabs will be displayed horizontally by default, as indicated by the line ‘type’ => ‘horizontal’. To use this parameter, include it in the shortcode like this: [ultra_tab_group type=”vertical”].

Examples and Usage

Basic example – The basic usage of the ‘ultra_tab_group’ shortcode requires no attributes. It will create a tab group with a default horizontal layout.

[ultra_tab_group][/ultra_tab_group]

Advanced examples

1. Changing the layout type of the tab group – You can customize the layout of your tab group by adding the ‘type’ attribute to the shortcode. The ‘type’ attribute accepts ‘horizontal’ and ‘vertical’ as values. Here is an example of a vertical tab group:

[ultra_tab_group type="vertical"][/ultra_tab_group]

2. Adding multiple tabs to the tab group – You can add multiple tabs to your tab group by nesting ‘ultra_tab’ shortcodes within your ‘ultra_tab_group’ shortcode. Each ‘ultra_tab’ shortcode represents a single tab. Here is an example of a tab group with three tabs:

[ultra_tab_group type="horizontal"]
[ultra_tab title="Tab 1"]Tab content 1[/ultra_tab]
[ultra_tab title="Tab 2"]Tab content 2[/ultra_tab]
[ultra_tab title="Tab 3"]Tab content 3[/ultra_tab]
[/ultra_tab_group]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_tab_group] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_tab_group', 'ultra_tab_wrap_shortcode');

Shortcode PHP function:

                    function ultra_tab_wrap_shortcode($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'type' => 'horizontal',
			), $atts, 'ultra_tab_group'));
	$ultra_tab_wrap = '<div class="clearfix ultra_tab_wrap '.$type.'">';
	$ultra_tab_wrap .= ultra_content_helper($content);
	$ultra_tab_wrap .= '</div>';
	return $ultra_tab_wrap;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_column] Shortcode

The Ultra Column shortcode is a versatile tool in the Ultra Companion plugin. It allows you to create a column structure in your content. When used, it generates a div with the class “ultra_column” and “ultra-span”. The ‘span’ attribute determines the width of the column. The default value is ‘6’, but it can be customized. The content within the column is processed through the ‘ultra_content_helper’ function.

Shortcode: [ultra_column]

Parameters

Here is a list of all possible ultra_column shortcode parameters and attributes:

  • span – Sets the width of the column in a 12-column layout

Examples and Usage

Basic example – The ultra_column shortcode is used to create a column of content with a specified span size. The ‘span’ attribute determines the width of the column.

[ultra_column span=6]Your content goes here[/ultra_column]

Advanced examples

Creating two columns of different widths. The first column has a ‘span’ of 4, making it smaller than the second column with a ‘span’ of 8.


[ultra_column span=4]Your content for the first column goes here[/ultra_column]
[ultra_column span=8]Your content for the second column goes here[/ultra_column]

Using the shortcode to display a nested column. The outer column has a ‘span’ of 6, and within it, there are two smaller columns with ‘span’ of 3 each.


[ultra_column span=6]
    [ultra_column span=3]Your content for the first nested column goes here[/ultra_column]
    [ultra_column span=3]Your content for the second nested column goes here[/ultra_column]
[/ultra_column]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_column] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_column', 'ultra_column_shortcode');

Shortcode PHP function:

                    function ultra_column_shortcode($atts, $content=null){
	extract(shortcode_atts( 
		array(
			'span' => '6',
			), $atts, 'ultra_column'));
	$ultra_column = '<div class="ultra_column ultra-span'.$span.'">';
	$ultra_column .= ultra_content_helper($content);
	$ultra_column .= '</div>';
	return $ultra_column;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_column_wrap] Shortcode

The Ultra Column Wrap shortcode is a versatile tool in the Ultra Companion plugin. It’s used to create a clear, organized layout on your page. This shortcode wraps the content within a ‘clearfix’ class and an ‘ultra-row’ class. This helps in clearing the float to prevent layout distortions and ensures the content is displayed in a row format. It’s a handy tool for managing your website’s content layout.

Shortcode: [ultra_column_wrap]

Examples and Usage

Basic example – The ultra_column_wrap shortcode is used to wrap content within a div with the class “clearfix ultra-row”.

[ultra_column_wrap]Your content here[/ultra_column_wrap]

Advanced examples

Using the ultra_column_wrap shortcode to wrap multiple paragraphs, creating a structured layout with clear separations. This is useful for when you want to group related content together.

[ultra_column_wrap]
    

First paragraph content

Second paragraph content

[/ultra_column_wrap]

Adding extra HTML elements within the shortcode. Here, we’re adding a header and an unordered list. The ultra_column_wrap shortcode will wrap around these elements, allowing you to style them as a group.

[ultra_column_wrap]
    

Your Header

  • First item
  • Second item
[/ultra_column_wrap]

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_column_wrap] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_column_wrap', 'ultra_column_wrap_shortcode');

Shortcode PHP function:

                    function ultra_column_wrap_shortcode($atts, $content=null){
	$ultra_column_wrap = '<div class="clearfix ultra-row">';
	$ultra_column_wrap .= ultra_content_helper($content);
	$ultra_column_wrap .= '</div>';
	return $ultra_column_wrap;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_list] Shortcode

The Ultra List shortcode is a versatile tool that allows users to create customized lists in WordPress. It uses the ‘ultra_list’ shortcode to generate a list. The shortcode uses the ‘list_type’ attribute to specify the type of list, defaulting to ‘ultra-list1’. Users can customize the list by changing this attribute. The ‘ultra_content_helper’ function is then used to populate the list with content.

Shortcode: [ultra_list]

Parameters

Here is a list of all possible ultra_list shortcode parameters and attributes:

  • list_type – Determines the style of the ultra list

Examples and Usage

Basic example – A simple usage of the ‘ultra_list’ shortcode with the ‘list_type’ parameter set to ‘ultra-list1’.

[ultra_list list_type='ultra-list1']

Advanced examples

Utilizing the ‘ultra_list’ shortcode with a different ‘list_type’ parameter. This allows for customization of the list’s appearance based on the styles associated with ‘ultra-list2’.

[ultra_list list_type='ultra-list2']

Employing the ‘ultra_list’ shortcode without any parameters. This will default the ‘list_type’ parameter to ‘ultra-list1’ as defined in the shortcode’s PHP function.

[ultra_list]

Note: The ‘ultra_list’ shortcode requires the ‘ultra_content_helper’ function to process its content. Ensure that this function is properly defined and functional within your theme or plugin.

PHP Function Code

In case you have difficulties debugging what causing issues with [ultra_list] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ultra_list', 'ultra_list_shortcode');

Shortcode PHP function:

                    function ultra_list_shortcode($atts, $content=null){
    extract(shortcode_atts( 
		array(
			'list_type' => 'ultra-list1',
			), $atts, 'ultra_list'));
	$ultra_list = '<ul class="ultra-list '.$list_type.'">';
	$ultra_list .= ultra_content_helper($content);
	$ultra_list .= '</ul>';
	return $ultra_list;
}
                    

Code file location:

ultra-companion/ultra-companion/shortcodes/shortcodes.php

Ultra Companion [ultra_li] Shortcode

The Ultra Companion plugin shortcode ‘ultra_li’ is designed to create list items in WordPress. Upon execution, it wraps the inserted content in a list item tag (

  • ). This simplifies the process of creating HTML lists within your posts or pages. It’s a handy tool for organizing content in a structured manner.

    Shortcode: [ultra_li]

    Examples and Usage

    Basic example – The ultra_li shortcode is utilized to insert a list item in a post or page. The content within the shortcode will be wrapped with

  • HTML tag.

    [ultra_li]This is a list item[/ultra_li]

    PHP Function Code

    In case you have difficulties debugging what causing issues with [ultra_li] shortcode, check below the related PHP functions code.

    Shortcode line:

    add_shortcode('ultra_li', 'ultra_li_shortcode');

    Shortcode PHP function:

                        function ultra_li_shortcode($atts, $content=null){
    	$ultra_li = '<li>';
    	$ultra_li .= ultra_content_helper($content);
    	$ultra_li .= '</li>';
    	return $ultra_li;
    }
                        

    Code file location:

    ultra-companion/ultra-companion/shortcodes/shortcodes.php

    Ultra Companion [ultra_dropcaps] Shortcode

    The ‘ultra_dropcaps’ shortcode in the Ultra Companion plugin is designed to style the initial letter of a text block. This shortcode applies a specific style to the first letter of your content, making it stand out. The ‘style’ attribute allows customization, defaulting to ‘ultra-normal’ if not specified. The content within the shortcode tags is processed by the ‘ultra_content_helper’ function, ensuring smooth rendering.

    Shortcode: [ultra_dropcaps]

    Parameters

    Here is a list of all possible ultra_dropcaps shortcode parameters and attributes:

    • style – determines the style of the dropcap text

    Examples and Usage

    Basic example – A simple usage of the ultra_dropcaps shortcode. This will apply the default ‘ultra-normal’ style to the dropcap.

    [ultra_dropcaps]P[/ultra_dropcaps]

    Advanced examples

    Applying a different style to the dropcap. Here, we’re using the ‘ultra-bold’ style instead of the default.

    [ultra_dropcaps style='ultra-bold']P[/ultra_dropcaps]

    Using the shortcode to apply multiple styles to the dropcap. In this example, we’re applying both ‘ultra-bold’ and ‘ultra-italic’ styles to the dropcap.

    [ultra_dropcaps style='ultra-bold ultra-italic']P[/ultra_dropcaps]

    Remember, the ‘style’ attribute in the shortcode can accept any valid CSS class that is defined in your theme or plugin’s CSS files. This allows for a great deal of customization and flexibility in how your dropcaps are displayed.

    PHP Function Code

    In case you have difficulties debugging what causing issues with [ultra_dropcaps] shortcode, check below the related PHP functions code.

    Shortcode line:

    add_shortcode('ultra_dropcaps', 'ultra_dropcaps_shortcode');

    Shortcode PHP function:

                        function ultra_dropcaps_shortcode($atts, $content = null) {
        extract(shortcode_atts(
                        array(
            'style' => 'ultra-normal',
                        ), $atts, 'ultra_dropcaps'));
        $ultra_dropcaps = '<span class="ultra-dropcaps '.$style.'">';
        $ultra_dropcaps .= ultra_content_helper($content);
        $ultra_dropcaps .= '</span>';
        return $ultra_dropcaps;
    }
                        

    Code file location:

    ultra-companion/ultra-companion/shortcodes/shortcodes.php

    Ultra Companion [ultra_tagline_box] Shortcode

    The Ultra Tagline Box shortcode is a customizable feature in WordPress. It generates a stylized text box for taglines. This shortcode creates a tagline box with a default text, but you can change it via ‘ultra_tagline_text’ attribute. The style of the box can also be customized using the ‘tag_box_style’ attribute. The shortcode wraps the content within a div class, allowing for further styling and positioning.

    Shortcode: [ultra_tagline_box]

    Parameters

    Here is a list of all possible ultra_tagline_box shortcode parameters and attributes:

    • ultra_tagline_text – Input your desired tagline text here.
    • tag_box_style – Choose the style for your tagline box.

    Examples and Usage

    Basic example – A simple usage of the ultra tagline box shortcode with the default parameters.

    [ultra_tagline_box /]

    Advanced examples

    Using the shortcode to display a tagline box with custom text and style. The text will be displayed in the box, and the box will be styled according to the ‘tag_box_style’ parameter.

    [ultra_tagline_box ultra_tagline_text="Your Custom Text Here" tag_box_style="ultra-no-border-box" /]

    Using the shortcode to display a tagline box with only custom text. The box will be styled with the default style, and the text will be displayed in the box.

    [ultra_tagline_box ultra_tagline_text="Your Custom Text Here" /]

    Using the shortcode to display a tagline box with only a custom style. The box will be styled according to the ‘tag_box_style’ parameter, and the default text will be displayed in the box.

    [ultra_tagline_box tag_box_style="ultra-no-border-box" /]

    PHP Function Code

    In case you have difficulties debugging what causing issues with [ultra_tagline_box] shortcode, check below the related PHP functions code.

    Shortcode line:

    add_shortcode('ultra_tagline_box', 'ultra_tagline_box_shortcode');

    Shortcode PHP function:

                        function ultra_tagline_box_shortcode($atts, $content = null) {
        extract(shortcode_atts(
                        array(
            'ultra_tagline_text' => 'Enter you Tag Line text here',
            'tag_box_style' => 'ultra-all-border-box',
                        ), $atts, 'ultra_tagline_box'));
    
        $ultra_tagline_box = '<div class="ultra_tagline_box clearfix ' . $tag_box_style . '">';
        $ultra_tagline_box .= ultra_content_helper($content);
        $ultra_tagline_box .='</div>';
        return $ultra_tagline_box;
    }
                        

    Code file location:

    ultra-companion/ultra-companion/shortcodes/shortcodes.php

    Ultra Companion [ultra-date] Shortcode

    The Ultra-Date shortcode is a feature of the Ultra Companion Plugin. It displays the current date on a WordPress page or post. This shortcode accepts a ‘format’ attribute, allowing users to customize the date format. By default, it displays the date in ‘F j, Y’ format.

    Shortcode: [ultra-date]

    Parameters

    Here is a list of all possible ultra-date shortcode parameters and attributes:

    • format – specifies the date format to display on the website

    Examples and Usage

    Basic example – The ultra-date shortcode displays the current date in the specified format. By default, it shows the full month, day, and year.

    [ultra-date /]

    Advanced examples

    Use the ultra-date shortcode to display the current date in a different format. For instance, you can show the date in the “Y-m-d” format (Year-Month-Day). Just pass the desired format as an attribute to the shortcode.

    [ultra-date format="Y-m-d" /]

    Another advanced usage of the ultra-date shortcode is to display the current date and time. To do this, pass the format “F j, Y, g:i a” to the shortcode. This will display the full month, day, year, hour, and minute, with AM or PM.

    [ultra-date format="F j, Y, g:i a" /]

    PHP Function Code

    In case you have difficulties debugging what causing issues with [ultra-date] shortcode, check below the related PHP functions code.

    Shortcode line:

    add_shortcode('ultra-date','ultra_current_date_shortcode');

    Shortcode PHP function:

                        function ultra_current_date_shortcode($atts){
        extract(shortcode_atts(
            array(
            	'format' => 'F j, Y',
            ), $atts, 'ultra-date'));
    	?>
    	<span class="current-date"><?php echo date($atts['format']);?></span>
    	<?php
    }
                        

    Code file location:

    ultra-companion/ultra-companion/shortcodes/shortcodes.php

    Conclusion

    Now that you’ve learned how to embed the Ultra Companion Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

  • Comments

    Leave a Reply

    Your email address will not be published. Required fields are marked *