2046's Loop widget

Content builder for Wordpress

Check out its successor → EASY!



2046's loop widgets boost your website prototyping.
Though the 2046's lop widget is fully functional, it will be not develeoped any further. EASY will take it's place instead.

The Drag&Drop content management is here. When you build the content with "2046's loop widget", the only thing you have to decide is what content you want to see and where. All the programming you always wanted to avoid is gone. The widget covers the most routinely used content logic. The aim of this widget is to speed up the process of content structuring and simplicity of usage while keeping the standarts.

Step by step explanation of all the widget settings


Here you can set up who can see the widget result on the front end.


  • Anyone
  • Subscriber
  • Contributor
  • Author
  • Editor
  • Administrator

Note: see the full roles explanation on http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table

Post type

All the content in WordPress; Posts, Pages, Images etc. are post types. Each of them have specific characteristic.
Post types are linear, by default sorted by date. These are the posts for yor blog.
Page types are by default hierarchical. So called static pages.

Your custom posts.
They can be either post type (linear) or Page type (hierarchical).. You can make your own by CCTM plugin, or any other Custom Post type plugin, or make it your own http://codex.wordpress.org/Post_Types

Note: Because the Post type can be almost anything, whatever post type will be called an object in this manual.

Choices (All the registered post types):
by default:

  • Post
  • Page
  • if you have your custom post types then you’ll see them there too.

Note: When you change the post type, the widget “closes”. You have to confim the change by the save button.
The widget then gets all the proper data for the particular post type, like categories, tags, hierarchical or linear setings etc.

Afterwards the widget is divided in to two logical parts.
The “content” on the left and the “logic” right.

In the content part you decide what part of the post, page you want to see. Like: title, edit link, featured image, content, categories, etc.
The logic part is more complex. There you can restrict the widget for certain places, where it can be show. More necasarily on what logic is the content taken.
You can set the widget to render only post from a category, or only posts who has specific custom_meta value or only child pages of the given page and so on.

The widget name

This name will be used as a heading on the top where the widget will be displayed. The name is also used for the title of the widget it self.

Note: the widget title as like the widget it self follows the rules from the register_sidebar declaration (http://codex.wordpress.org/Function_Reference/register_sidebar).



  • show title: Show or hide the objet title (post or page title, alternatively image title etc.)
  • as link: The title will be a link to the object it self
  • show edit link: Show the link to the admin page where you can edit this object. The edit link also shows you the object ID. This whole edit link is shown only to logged in users.


  • no picture
  • thumbnail
  • medium

This will show the featured image associated with the object.

Image linking

Make the picture as a link to:

  • Nothing (no link)
  • Image as link to .. Object it self.
  • To a large version of the featured image (God for galleries)

Show comments booble

Show the comment number close to the object title.


  • No content – There won’t be any content or excerpt.
  • Excerpt – Shows only object excerpt. If that doesn’t exists, it will auto make it form the content.
  • Content – Shows the full object content (the body of the post, page, etc.).

Whether to show metadata for ..

It will output the so called metadata of the post. They are located always after the content, or excerpt part.


  • Date
  • Author
  • Categories
  • Tags

Show comments

  • show
  • hide

Note: Comments can be shown only on the final or if you like single object page. Not in the list. category list, archive list etc.

Show warning text if comments are closed:

Normaly when the comments are closed a warning about this situation is shown. This will hide it if you like.



  • Without navigation: If on the single object page, there won’t be any link to next or previous post. And if on object list, there wont by any link to next, or previous list, or any pagination.
  • Prev-Next Only on final ..: Shows the link to the previous or next object. This is shown only on final – single object page.
  • Prev-Next links: Links to the next archive, category, etc. page.
  • Wp-page navi: Available only when the wp-pagenavi plugin is installed and activated. It will show nice numbered pagination. http://wordpress.org/extend/plugins/wp-pagenavi/

Allow pagination

ON-OFF: Everything on the front end page is affected by the pagination.
If you run multiple widgets (loops) on one page and you go to the next page (for example from index to next X posts), then also the widget loop goes to “it’s” next page.
If you want to avoid this behavior, because you want to see only the fixed objects not effected by other possibly paged objects, uncheck it.


Scafolding is the div structure which surounds the objects. This is important when you start to work on the theme tweaking.
The scafold can have various structures. These setting should give you the maximum flexibility to construct what ever scafold you’ll need in your webdesign.

Note: The scafolding logic has it’s root in the Boostrap. When you look on te Boostrap scafoldig logic, you find out that it actually covers all necessary div layouts
we need.


  • Basic WordPress classes:
    looks like this
    basic - scaffolding
    It is fixed and all the classes are done by the WordPress inner class structures. The content is than easily skin-able by CSS.
  • One line per row
    one per row - scaffolding
    It might sound silly but you might find it useful. it looks like this.
    In this case you can add your own class to each row div and also to the column div. Grate for your custom CSS tweaking.
  • Third type is
    many per row - scaffolding
    many columns per row
    . This probably the most used one and the scaffold looks like this

Also in this case you can add your own class to each row div and also to the column div. Grate for your custom CSS tweaking.

Note: You can add mutliple classes separated by comma (row my_special_class my extra_class).

The Logic

Preamble (Loop)

When ever you want to get the content of anything you run loop. Every part of the object can be shown within a loop – a request for the object and its belongings.
So when you see for example the category list with say 10 posts then Wordpress has done 10 loops. One loop for each post and asked for the content of each object..title, excerpt etc.
Keep it in mind in further reading.

Where this loop will be shown & what


  • Elsewhere
    This is the most flexible Logic and most likely the most used.
    The result is independent of any place. The widget can be used on index, single page, where ever. The loop you’ll set up here can be filtered by many ways. It can be filtered by categories, tags and many others..
  • On final ..(object):
    Although you might run the Elsewhere logic anywhere this setting is most suitable especially when you want to get the content of the object (the final, and full content of the post or page).
    If you choose this choice, you’ll get simply the content of the object you are looking at. No extra settings necessary.
    Note: here comes in use the comments setting in the content area, if you would like to do something with comments.
  • Gallery
    This is a special aid. Dene exclusively for images belonging to a object (post, page etc.).
    When you choose this and do not enter any special “ID” in the “Enter Post ID(s)” field then it will autoamtically gets all the images (if no further restriction is applied) from
    the object. If you set the ID, it’ll gets the images belonging to this specific object. In this case the content area on the left side of the widget affects images as if they are posts. They are actually an object similar to the posts, or pages. When you select in the content area that you would like to see the “title” then the image title will be shown etc.

    Note: When ever you upload images when you edit the object, the WordPress rememnbers that they are associated with that object.
    These images we will fetch.

Select the logic


  • Select …(s) by ID
    Only the object with the given ID will be considered.
  • Selected taxonomy
    Only objects associated with the selected taxonomy are considered.
  • From the same taxonomy
    The widget will try to get the taxonomy ID of the actualy displayed object and will try to fetch other objects in the same taxonomy(category).
    Note: This can be taken to numerous scenarios. In this case it catches the first taxonomy it finds and affects the result by it.
  • By custom meta values
    All the objects can have it’s own custom meta values. You could crate some, or some plugin could do it for many reasons. They can by used for price, or extra title, or what ever you like.
    This logic lets you filter the result by one of the selected custom post type and its value.
    Remember? The WordPress have two post types, hierarchicval and linear. These setting are aplicable only for hierarchical types, so you wont see these setting fo linear types!
  • Children page of the .. parent (only for hyerarchical post types):
    It gets all or number of object belonging to the selected object. A level up in the hierarchy.
  • Children Page of the displayed .. The widget finds the current seen hierarchical object ID, finds it’s children objects and returns them,
    This is good when you put it on the page and let it automatically finds the child objects (pages).
  • … from the same hyerarchical level This will show all or numbers of the currently seen object which are in the same hierarchy level – have a same parent object (page).
  • number of posts Specify the number of post you want to get.

Note: if you allowed the pagination, then it will gets X desired objects and on the next page another X objects, etc (of this view, like page two of the category xyz …).


How many objects of from the result you want to skip.



  • Descendingly
  • Ascendingly



  • none
  • ID
  • date
  • modified
  • rand
  • comment count
  • menu order
  • parent
  • meta values
  • meta value num (when the values are numbers.. this is different then alphabetical ordering!)

Restrict to

Here you can restrict the widget to be show only on specific places.


  • Only on given ID
  • Only on child pages of the given id (for hierarchical post types only!)
  • for the given Id and its child … (for hierarchical post types only!)

Prevent from being shown on


  • Simple post
  • Home page (where your blog posts are being shown)
  • Front page (On the page you have choosen to by your home page)
  • Archive list
  • Category list
  • Tag list
  • Author’s list
  • Search page
  • 404 error page
  • or on selected object ID


Will output the query arguments you have build by this widget. So you can check what you have set up, and compare it with the result.

Note: the output is wrapped in the extra class, so you can hide it to all non logged in users. So you can debug the result on live page with “nobody” noticing :P
If you use the WordPress body classes put this in your CSS: .logged-in .lw_2046_debug{display:none !important;}


The widget is ready to be translated to any language (gettext).

Current languages:

To fully benefit from this plugin you should try to remove all the loops from your classical theme and replace it simply by sidebars (example below). Then you can Drag&Drop the content where ever you want. No other coding except CSS styling needed.

Finally you'll have nice and simple template and everything under control from the widget area.

Example of the index.php

If you use this widget system then your index.php might look like this

<?php get_header(); ?>
<div class="row">
	<div class="col_5">
		<?php dynamic_sidebar( 'sidebar-1' ); ?>
	<div class="col_3">
		<?php dynamic_sidebar( 'sidebar-2' ); ?>
	<div class="col_3">
		<?php dynamic_sidebar( 'sidebar-3' ); ?>
<?php get_footer(); ?>

Don't forget to register these sidebars in the function.php! How to register sidebar.

Simple huh ;)

Download from Wordpress official repository

Download 2046's Loop widget ⇩

Does it save time for you? It'll be awesome if you donate.

Distributed free under GNU GENERAL PUBLIC LICENSE.