<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shortcodes Ultimate Archives - Web321: Your Best WordPress Support</title>
	<atom:link href="https://n2025.web321.co/tag/shortcodes-ultimate/feed/" rel="self" type="application/rss+xml" />
	<link>https://n2025.web321.co/tag/shortcodes-ultimate/</link>
	<description>Your WordPress Website Maintenance Experts</description>
	<lastBuildDate>Mon, 20 Mar 2023 05:13:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://n2025.web321.co/wp-content/uploads/2022/04/cropped-favicon-32x32.png</url>
	<title>Shortcodes Ultimate Archives - Web321: Your Best WordPress Support</title>
	<link>https://n2025.web321.co/tag/shortcodes-ultimate/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</title>
		<link>https://n2025.web321.co/ultimate-lists-how-to-use-shortcodes-ultimate-to-build-great-lists-in-wordpress/</link>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Mon, 27 Mar 2023 16:11:26 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Shortcodes Ultimate]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://web321.co/?p=55797</guid>

					<description><![CDATA[<p>Shortcodes Ultimate is a popular WordPress plugin that provides a variety of shortcodes that allow users to add various functionality and design elements to their website. One of the most useful shortcodes in the plugin is the su_post shortcode, which allows users to display posts on their website with customizable options. In this article, we [&#8230;]</p>
<p>The post <a href="https://n2025.web321.co/ultimate-lists-how-to-use-shortcodes-ultimate-to-build-great-lists-in-wordpress/">Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</a> appeared first on <a href="https://n2025.web321.co">Web321: Your Best WordPress Support</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Shortcodes Ultimate is a popular WordPress plugin that provides a variety of shortcodes that allow users to add various functionality and design elements to their website. One of the most useful shortcodes in the plugin is the su_post shortcode, which allows users to display posts on their website with customizable options.</p>
<p>In this article, we will go over how to use the su_post shortcode, including its syntax, available attributes, and some examples of how to use it.</p>
<h2><b>Syntax of su_post Shortcode</b></h2>
<p>To display a post using the su_post shortcode, you would use the following syntax:</p>
<pre>Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</pre>
<p>&#8220;post_ID&#8221; is the ID number of the post you want to display.</p>
<h2><b>Attributes of su_post Shortcode</b></h2>
<p>The su_post shortcode has a number of attributes that you can use to customize the way your posts are displayed. Here are the available attributes:</p>
<h3><b>id</b></h3>
<p>The &#8220;id&#8221; attribute is required for the su_post shortcode, as it specifies which post to display. To use this attribute, you need to replace &#8220;post_ID&#8221; in the basic syntax with the actual ID number of the post you want to display.</p>
<p>For example, if the ID number of the post you want to display is 123, you would use the following code:</p>
<pre>Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</pre>
<h3><b>post_type</b></h3>
<p>By default, the su_post shortcode displays posts from the &#8220;post&#8221; post type. However, you can use the &#8220;post_type&#8221; attribute to display posts from other post types, such as &#8220;page&#8221; or a custom post type.</p>
<p>To use this attribute, simply add it to the shortcode and set its value to the post type you want to display. For example, to display a page with ID 456, you would use the following code:</p>
<pre>Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</pre>
<h3><b>class</b></h3>
<p>The &#8220;class&#8221; attribute allows you to add custom CSS classes to the HTML elements generated by the shortcode. This can be useful for styling the output of the shortcode with CSS.</p>
<p>To use this attribute, simply add it to the shortcode and set its value to the CSS class(es) you want to use. For example, to add the class &#8220;my-custom-class&#8221; to the output of the shortcode, you would use the following code:</p>
<pre>Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</pre>
<h3><b>template</b></h3>
<p><img decoding="async" class="alignright wp-image-55798 size-medium" src="https://web321co.b-cdn.net/wp-content/uploads/2023/03/Screenshot-2023-03-19-at-19-20-09-Site-Tools-300x136.png" alt="" width="300" height="136" srcset="https://n2025.web321.co/wp-content/uploads/2023/03/Screenshot-2023-03-19-at-19-20-09-Site-Tools-300x136.png 300w, https://n2025.web321.co/wp-content/uploads/2023/03/Screenshot-2023-03-19-at-19-20-09-Site-Tools-480x217.png 480w, https://n2025.web321.co/wp-content/uploads/2023/03/Screenshot-2023-03-19-at-19-20-09-Site-Tools-2x1.png 2w, https://n2025.web321.co/wp-content/uploads/2023/03/Screenshot-2023-03-19-at-19-20-09-Site-Tools.png 563w" sizes="(max-width: 300px) 100vw, 300px" />The &#8220;template&#8221; attribute allows you to use a custom template file to display the post. This can be useful if you want to display posts in a specific way that is not possible with the default output of the shortcode.</p>
<p>To use this attribute, simply add it to the shortcode and set its value to the file path of the template you want to use. For example, to use a template file called &#8220;news-loop.php&#8221; located in your theme&#8217;s directory, you would use the following code:</p>
<pre>Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</pre>
<pre>&lt;ul class="su-posts su-posts-news-loop"&gt;
&lt;?php
// Posts are found
if (isset($args['data'])) {
$posts = $args['data'];
}
if ( $posts-&gt;have_posts() ) {
$cat_singular = array(
'blog' =&gt; 'Blog',
'case-study' =&gt; 'Case Study',
'company-update' =&gt; 'Company Update', 
'new' =&gt; 'News',
'resources' =&gt; 'Resources',
'videos' =&gt; 'Videos'
);

$cat_css = array(
'blog' =&gt; 'blog',
'case-study' =&gt; 'case-study',
'company-update' =&gt; 'company-update', 
'new' =&gt; 'news',
'resources' =&gt; 'resource',
'videos' =&gt; 'video'
);

$cat_img = array(
'blog' =&gt; '/wp-content/themes/CustomTheme/assets/img/article-sm.png', n
'articles-whitepapers' =&gt; '/wp-content/themes/CustomTheme/assets/img/article-sm.png',
'case-studies' =&gt; '/wp-content/themes/CustomTheme/assets/img/case_study-sm.png',
'new' =&gt; '/wp-content/themes/CustomTheme/assets/img/article-sm.png',
'resources' =&gt; '/wp-content/themes/CustomTheme/assets/img/article-sm.png',
'videos' =&gt; '/wp-content/themes/CustomTheme/assets/img/video-sm.png'
); 


$roundout = 0;
while ( $posts-&gt;have_posts() ) {
$posts-&gt;the_post();
global $post;

$singular = 'N/A';
$css = 'na'; 
$roundout++;

$categories = get_the_category(); 
$tags = get_the_tags(); 

// print print_r($categories, TRUE);

// should be one per...
foreach ($categories as $cat) {
if (array_key_exists($cat-&gt;slug, $cat_singular)) {
$cat_slug = $cat-&gt;slug; 
$singular = $cat_singular[$cat_slug];
if (isset($cat_css[$cat_slug])) {
$css = $cat_css[$cat_slug];
} 
else {
$css = '';
}
if (isset($cat_img[$cat_slug])) {
$img = $cat_img[$cat_slug];
} 
else {
$img = '';
}

break;
}
}
// get all tags
$tag_list = "";
$comma = "";
if ($tags) {
foreach ($tags as $tag) {
$tag_list .= $comma.'&lt;a href="' . esc_attr( get_tag_link( $tag-&gt;term_id ) ) . '"&gt;' . __( $tag-&gt;name ) . '&lt;/a&gt;';
$comma = ", ";
}
} 
?&gt;
&lt;li id="su-post-&lt;?php the_ID(); ?&gt;" class="su-post &lt;?php print $css; ?&gt;-grid"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
&lt;?php if ($loop_thumb = get_the_post_thumbnail_url() ) { ?&gt;
&lt;div class="su-top" style="background-image: url('&lt;?php echo $loop_thumb; ?&gt;');"&gt;
&lt;?php }
else {
?&gt;
&lt;div class="su-top" style="background-color: #888888;"&gt;
&lt;?php } ?&gt;
&lt;img src="/wp-content/uploads/2023/01/blank.png" style="width: 100%; height: 25vh;" /&gt;
&lt;/div&gt;
&lt;div class="su-middle"&gt; 
&lt;h3 class="su-post-title rightarrow"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;em&gt;&lt;?php echo $tag_list; ?&gt;&lt;/em&gt;
&lt;?php 
if ($excerpt = get_the_excerpt()) {
print "&lt;p&gt;".$excerpt."&lt;/p&gt;"; 
print "&lt;br/&gt;";
}
?&gt;
&lt;?php print $runtime; ?&gt;
&lt;/div&gt; 
&lt;div class="su-bottom"&gt;
&lt;span class="date"&gt;&lt;?php print get_the_date('F j, Y', get_the_ID()) ?&gt;&lt;/span&gt;
&lt;span class="link"&gt;&lt;a class="rightarrow" href="&lt;?php the_permalink(); ?&gt;"&gt;Link&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;

&lt;/li&gt;
&lt;?php
}
}
// Posts not found
else {
?&gt;
&lt;li&gt;&lt;?php _e( 'No Results', 'shortcodes-ultimate' ) ?&gt;&lt;/li&gt;
&lt;?php
}
?&gt;
&lt;/ul&gt;
</pre>
<p><img fetchpriority="high" decoding="async" class="alignleft wp-image-55799" src="https://web321co.b-cdn.net/wp-content/uploads/2023/03/Screenshot-2023-03-19-at-19-18-16-Learn-Blogs-Case-Studies-Accessibility-Guides-Polara.png" alt="" width="215" height="360" />The news-loop.php goes into the templates sub-directory of the site’s active theme. When the template loops through the su_posts result, the template will handle the output. In our example, the control of the output lets us add more formatting and supporting information.</p>
<p>The su_posts shortcode is a versatile tool that can be used in many different ways to improve the functionality and user experience of your website. Shortcodes Ultimate is a popular WordPress plugin that provides a variety of useful shortcodes for adding various elements to your website.</p>
<p>There are even more advanced ways to make use of the su_post shortcode. Want to know more?</p>
<p>The post <a href="https://n2025.web321.co/ultimate-lists-how-to-use-shortcodes-ultimate-to-build-great-lists-in-wordpress/">Ultimate Lists: How To Use Shortcodes Ultimate to Build Great Lists In WordPress</a> appeared first on <a href="https://n2025.web321.co">Web321: Your Best WordPress Support</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
