>
Download This Plugin | |
Download Elegant Themes | |
Name | WP-Diagram |
Version | 0.02 |
Author | Vinicius Massuchetto |
Rating | 0 |
Last updated | 2013-07-25 07:04:00 |
Downloads |
393
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
WP-Diagram plugin added 1 bytes of resources to the Home page and 16 bytes of resources to the sample Post page.
WP-Diagram plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! WP-Diagram plugin ads no tables to your Wordpress blog database.In commercial theme development it's common to have different post listings across several positions of the theme. We usually end up creating post types and specific categories for users to put posts in these positions.
This plugin creates a dedicated interface for post positioning and scheduling in the theme. For example, assume you want two different post listings, one for a top slideshow, and another for featured news:
Register the positions in your functions.php
:
wp_diagram_register_positions( array(
array(
'id' => 'home_slideshow',
'name' => 'Home Slideshow'
),
array(
'id' => 'featured_news',
'name' => 'Featured News'
)
) );
Then, after selecting the posts for each position in the Positioning
menu in the admin interface, just call the custom loop in your template:
<?php $slideshow = wp_diagram_get_query( 'home_slideshow' ); ?>
<?php if ( $slideshow->have_posts() ) : ?>
<?php while( $slideshow->have_posts() ) : $slideshow->the_post(); ?>
<?php // Post loop like any other ?>
<?php endwhile; ?>
<?php endif; ?>
The custom loop above will get the posts scheduled for the home_slideshow
in the current time.