2046’s loop widget

Content builder for WordPress

Check out its successor → EASY

Description

2046’s loop widgets boost your website prototyping.
Though the 2046’s loop widget is fully functional, it will not be developed any further. EASY will take its 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 which 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 enhance the simplicity of usage while keeping the standards.

 

 

Step by step explanation of all the widget settings

 

Permissions

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

Choices:

  • 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

Posts, Pages, Images, etc., all the content in WordPress, are different types of posts. Each of them has a specific characteristic.
Post types are linear, by default sorted by date. These are the posts for your 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, whichever 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 will see them there too.

Note: When you change the post type, the widget “closes”. You have to confirm 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 settings, etc.

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

In the content part, you decide which part of the post/page you want to see. For example, 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 shown. More necessarily, in which logic the content is taken.
You can set the widget to render only posts from a certain category, or only posts which have a 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 itself.

Note: The widget title, in the same way as the widget itself, follows the rules from the register_sidebar declaration (http://codex.wordpress.org/Function_Reference/register_sidebar).

Content

Choices:

  • Show title: Show or hide the object title (post or page title, alternatively image title, etc.)
  • As link: The title will be a link to the object itself
  • 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 the logged in users.

Image

  • 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 the object itself.
  • To a large version of the featured image (good for galleries)

Show comments bobble

Show the comment number close to the object title.

Content

  • No content – there will not be any content or excerpt
  • Excerpt – shows only object excerpt. If that does not exist, it will auto-create it from 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.

Choices:

  • 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, or archive list etc.

Show warning text if comments are closed:

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

Navigation

Choices:

  • Without navigation: If on the single object page, there will not be any link to the next or the previous post. And if on the object list, there will not be any link to the 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 “its” next page.
If you want to avoid this behavior, because you want to see only the fixed objects not affected by the other possibly paged objects, uncheck it.

Scaffolding

Scaffolding is the div structure which surrounds the objects. This is important when you start working on the theme tweaking.
The scaffold can have various structures. These settings should give you the maximum flexibility to construct whichever scaffold you will need in your webdesign.

Note: The scaffolding logic has its root in the Boostrap. When you look at the Boostrap scaffolding logic, you will find out that it actually covers all necessary div layouts we need.

Choices:

  • Basic WordPress classes:
  • basic - scaffolding

It is fixed and all the classes are done by the WordPress inner class structures. The content is then 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. Greqt for your custom CSS tweaking.

  • Many columns per row
    many per row - scaffolding
    is the third type. This is 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. Great for your custom CSS tweaking.

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

The Logic

Preamble (Loop)

Whenever you want to get the content of anything you run the 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 let’s say 10 posts, then WordPress has done 10 loops. One loop for each post and it asked for the content of each object title, excerpt etc.
Keep it in mind when reading further.

Where this loop will be shown & what it will show

Choices

  • 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 the index, the single page, wherever. The loop you will set up here can be filtered in many ways. It can be filtered by categories, tags, and many others…
  • On the final object:
    Although you might run the Elsewhere logic anywhere, this setting is the 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. Made exclusively for images belonging to an 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 automatically get all the images (if no further restriction is applied) from
    the object. If you set the ID, it will get 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 were 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: Whenever you upload images when you edit the object, the WordPress remembers that they are associated with that object.
These images we will fetch.

Select the logic

Choices:

  • 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 actually displayed object and it 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 its own custom meta values. You could create some, or some plugin could do it for many reasons. They can be used for price, or extra title, or whatever 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, hierarchical and linear. These settings are applicable only for hierarchical types, so you will not see these settings for linear types!
  • Children Page of the … parent (only for hierarchical post types):
    It gets all or number of objects belonging to the selected object. A level up in the hierarchy.
  • Children Page of the displayed  The widget finds the currently seen hierarchical object ID, finds its children objects and returns them. This is good when you put it on the page and let it automatically find the child objects (pages).
  • … from the same hierarchical level This will show all or numbers of the currently seen objects which are in the same hierarchy level – have the same parent object (page).
  • The number of posts Specifies the number of the posts you want to get.

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

Offset

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

Order

Choices:

  • Descendingly
  • Ascendingly

Order by

Choices:

  • None
  • ID
  • Date
  • Modified
  • Rand
  • Comment count
  • Menu order
  • Parent
  • Meta values
  • Meta value num (when the values are numbers, then it is different than the alphabetic ordering!)

Restrict to

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

Choices:

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

Prevent from being shown on

Choices:

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

Debug

Will output the query arguments you have built 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;}


Localization

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

Current languages:

  • English
  • Czech

 

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 wherever you want. No other coding except CSS styling needed.

Finally, you will have a nice and a 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

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 will be awesome if you donate.