WordPress.org

Ready to get started?Download WordPress

Plugin Directory

My Post Order

A plugin which allows you to sort posts, pages, custom post type in ANY order and display the same in your sidebar.

How can I use custom template option in widget?

You need to create loop.php file in your custom-templates folder. For eg.

<ul>  <?php
    while ($the_query->have_posts()) : $the_query->the_post(); ?>
      <li>
        <span class="mpo_post_title">
          <a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>">
            <?php if ( get_the_title() ) the_title(); else the_ID(); ?>
          </a>
        </span>
      </li> <?php
    endwhile; ?>
  </ul>

For for rss option create another file loop_rss.php

<ul> <?php
    foreach ( $rss_items as $item ) { ?>
      <li>
        <a target="_blank"  href="<?php echo $item->get_permalink();?>"><?php echo $item->get_title(); ?></a>
      </li> <?php
    } ?>
  </ul>

Can you show us some examples how can we add code in our themes?

I'm giving three examples from Twenty Twelve, Twenty Eleven and Twenty Ten

In Twenty Twelve(verison 1.1) you need to edit your index.php file like this

get_header(); ?>

  <div id="primary" class="site-content">
    <div id="content" role="main">
    <?php query_posts('section_name=lipsum'); ?>
    <?php if ( have_posts() ) : ?>

In Twenty Eleven(verison 1.5) you need to edit your index.php file like this

get_header(); ?>

    <div id="primary">
      <div id="content" role="main">
       <?php query_posts('section_name=lipsum'); ?>
      <?php if ( have_posts() ) : ?>

In Twenty Ten(verison 1.5) you need to edit your loop.php file like this

<?php
    if (is_home()) {
      query_posts('section_name=lipsum');
    }
    while ( have_posts() ) : the_post(); ?>

Here lipsum is the section name that I created in the backend.

Please send me your suggestions/feedback/queries to kapil.chugh@hotmail.com and help me to improve this Plugin.

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-1-11
Downloads: 51,341

Ratings

3 stars
3.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,2,2 33,3,1
50,2,1
67,3,2 50,6,3 50,2,1
100,3,3
67,3,2 100,1,1 80,5,4
50,4,2
0,1,0
100,1,1
100,1,1