WordPress Shortcode with loop, meta, category, Gallery and Plugins

Total
0
Shares

With shortcode it is possible to display complicated codes or function result every where in your WordPress  Theme like  in widgets, excerpts, comments, theme files, user descriptions, and category/tag/taxonomy descriptions. According to WordPress support’s site “A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut [shortcodes].

WordPress ShortCode

Shortcodes were introduced in WordPress 2.5, and allowed the Gallery feature allows the option to add an image gallery to a Post or Page on your WordPress blog. but now you can us shortcode for your theme by using WordPress plugins and can create your own function to display requires result. I was working on my client web site and was required to display one category post on a specific page, I tried few plugins but did not get the proper result so one of blog fellow have given a solution on Simple Recent Posts Shortcodes for WordPress, which help me a lot and here is my code for The Corporation WordPress Theme:

<?php
function my_recent_posts_shortcode($atts){

global $post;

$myposts = get_posts(“showposts=5&category=32″);
foreach($myposts as $post) : setup_postdata($post); ?>

<img width=”120″ height=”120″ <?php the_post_thumbnail(); ?>
<div class=”latest_news_box”>
<h3><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></h3>
<p><?php the_content_limit(520); ?></p>
</div>
<?php
endforeach;
}
?>

There are different requirement to display content on your blog, Kevin Chard have wriiten lot of usage of shortcode on his blog. You see shorcode usage on the following link: wpsnipp/shortcode. and  Filip Stefansson, the Founder and editor of WP-Snippets, explained in detail about shortcode usage on this link: Getting Started with WordPress Shortcodes (+Examples).

WordPress Plugins for Shortcode


slider gallery shortcode

This plugin creates a new shortcode for WordPress. With this new shortcode, you can create a slider gallery in seconds just by typing [slider] while you’re writing your post or page. The slider will display the images that you have uploaded to the current post or page.

If you need more options, this simple shortcode features multiple attributes that you can set. You can:

  • add controls to go back and forward through each slide
  • select an specific transition between images (fade, zoom, scroll, curtains, grow, toss and many more)
  • show the image title
  • set the size of the images displayed in the slider
  • wrap the image with a link to the image file
  • adjust the transition speed
  • set the pause between transitions
  • set the initial delay before the first transition
  • exclude some selected images.

TitanEditor – The Shortcode Editor On Steroids

Features

  • Drag and drop Functionality – Drag, drop, move or delete your short-codes until your satisfied.
  • Page template Manager – No more messing around inside your default pages and posts, create your own page templates filled with short-codes.
  • Button shortcode editor – Create as many button styles and shapes you want.
  • Most common shortcodes included – Buttons, tabs, accordion, toggle, slider, images, columns, lists, message boxes, video, quotes, separator, blog elements, galleria and pre/code
  • Quick fill – After adding your columns your able to fill them all by just one click.
  • TitanEditor Page Attributes – After creating your page template and you’ve filled and rearranged all components then just create a new page and select your page template from the TitanEditor Page Attributes window and your done.
  • Clever editing – Not happy after seeing your freshly baked page, then just select the template through TitanEditor and edit it, TitanEditor remembers where you have left and opens the page just as you left it.
  • Screencasts Included – Watch the videos for full instructions on how to use the editor, once your used to it you never return to the wp-editor ever again.
  • Blog Post compatible – Your also able to create a nice looking blog post that looks different then any other blog post. Just create a page template ad your content through the editor and assign this page template to that blog post.
  • Editors Option Panel – A option panel from where you can enable or diasble the stylings, so if you want to use your own then you only need to disable it.

Tabbed Content Shortcode

A clean, easy to integrate, reusable tabbed content area for your WordPress themes!

Features

  • Reusable , add as many as you want on the page!
  • Easy to use, activate and copy-paste the sample shortcodes to begin
  • Auto sizing on a tab by tab basis
  • Help and information admin page
  • Easy to integrate into any design

SWS: Nivo add-on for Styles With Shortcodes

SWS Nivo Shortcodes

Styles with Shortcodes is a great plugin that makes life easier using WordPress whether you are a seasoned developer, designer or just a normal user!

Shortcodes Ultimate

With this plugin you can easily create buttons, boxes, different sliders and much, much more. Turn your free theme to premiun in just a few clicks. Using Shortcodes Ultimate you can quickly and easily retrieve many premium themes features and display it on your site. See screenshots for more information.

Detail

Display Posts Shortcode

The Display Posts Shortcode was written to allow users to easily display listings of posts without knowing PHP or editing template files.

Detail

Category Post Shortcode

This plugin allow you to display post list in your page or post by using shortcode.

Detail

List category posts

The shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can also display the post author, date, excerpt, custom field values, even the content! The [catlist] shortcode can be used as many times as needed with different arguments on each post/page.

Detail

Category Shortcode

This plugin creates the [Category]] Shortcode. The code takes 5 arguments:
number: the number of posts to display. 0 equals the default number. -1 equals the total available.

Detail

Available shortcodes for WordPress Hosted Blog


Miscellaneous | Video | Images and Documents | Audio

Detail

Leave a Reply

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

Sign Up for Our Newsletters

Get notified of the best deals on our WordPress themes.

You May Also Like