Title: Sort Query Posts
Author: Tubal
Published: <strong>জানুয়ারি 15, 2011</strong>
Last modified: সেপ্টেম্বর 4, 2012

---

প্লাগিন অনুসন্ধান

এই প্লাগইনটি **ওয়ার্ডপ্রেসের সর্বশেষ ৩টি মেজর রিলিজের সাথে পরীক্ষা করা হয়নি**। এটি
আর রক্ষণাবেক্ষণ বা সমর্থন করা নাও হতে পারে এবং ওয়ার্ডপ্রেসের আরও সাম্প্রতিক সংস্করণগুলোর
সাথে ব্যবহার করার সময় কম্প্যাটিবিলিটি ইস্যু থাকতে পারে।

![](https://s.w.org/plugins/geopattern-icon/sort-query-posts.svg)

# Sort Query Posts

 তৈরি করেছেন [Tubal](https://profiles.wordpress.org/tubal/)

[Download](https://downloads.wordpress.org/plugin/sort-query-posts.1.1.zip)

 * [বিস্তারিত](https://bn.wordpress.org/plugins/sort-query-posts/#description)
 * [রিভিউ](https://bn.wordpress.org/plugins/sort-query-posts/#reviews)
 *  [ইন্সটলেশন](https://bn.wordpress.org/plugins/sort-query-posts/#installation)
 * [ডেভেলপমেন্ট](https://bn.wordpress.org/plugins/sort-query-posts/#developers)

 [Support](https://wordpress.org/support/plugin/sort-query-posts/)

## Description

A really simple and lightweight plugin (73 lines of code – comments included) to
sort posts on-the-fly without making a new query to the database (improves performance).

#### Features:

 * Supports **all `order_by` and `order` values of the [query_posts function](https://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters)**
   except `meta_value` and `meta_value_num` (which require a database query).
 * Supports **changing the order of all types of posts**, including custom post 
   type posts and custom post type “archive” posts.

#### Documentation

This plugin adds the function `sort_query_posts_by(string $order_by [, string $order])`
to the global context.
 The second `$order` parameter is optional. Its default value
is `asc` (ascending order).

**Call this function before [the loop](https://codex.wordpress.org/The_Loop) to 
change how posts are ordered.**
 After calling this function you can show the posts
as you normally would.

You can sort posts by:

 * author
 * comment_count
 * date
 * id
 * menu_order
 * modified
 * parent
 * title

This is specially useful in two cases:

 * When you need to reorder the posts returned by the query that WordPress creates
   from your given URL. Custom post type “archive” posts are a great example of 
   this case.
 * When you need the posts returned by your customized query (e.g. `query_posts()`)
   to be shown more than once on the same page and ordered differently.

**Examples:**

    ```
    <?php sort_query_posts_by('title', 'desc'); ?>
    ```

The example above will sort posts by their title in descending order without making
a new query to the database.
 This way sorting is performance friendly.

    ```
    <?php sort_query_posts_by('ID'); ?>
    ```

The example above will sort posts by their ID in ascending order.

    ```
    <?php sort_query_posts_by('rand'); ?>
    ```

The example above will sort posts randomly. When sorting randomly `$order` is ignored.

Plugin developed by Túbal Martín at [www.margenn.com](http://www.margenn.com).

## Installation

 1. Upload `sort-query-posts` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use the added function `sort_query_posts_by` after any wordpress query and your
    posts will be sorted to your needs.

## Reviews

There are no reviews for this plugin.

## ডেভেলপার এবং কন্ট্রিবিউটর

“Sort Query Posts” is open source software. The following people have contributed
to this plugin.

কন্ট্রিবিউটর

 *   [ Tubal ](https://profiles.wordpress.org/tubal/)

[Translate “Sort Query Posts” into your language.](https://translate.wordpress.org/projects/wp-plugins/sort-query-posts)

### ডেভেলপমেন্ট এ আগ্রহী?

[Browse the code](https://plugins.trac.wordpress.org/browser/sort-query-posts/),
check out the [SVN repository](https://plugins.svn.wordpress.org/sort-query-posts/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/sort-query-posts/)
by [RSS](https://plugins.trac.wordpress.org/log/sort-query-posts/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1

 * Code refactored for improved performance. Updating is recommended.

## মেটা

 *  Version **1.1**
 *  শেষ আপডেট করা হয়েছে **14 বছর আগে**
 *  Active installations **100+**
 *  WordPress version ** 2.5 or higher **
 *  Tested up to **3.4.2**
 *  Language
 * [English (US)](https://wordpress.org/plugins/sort-query-posts/)
 * ট্যাগ
 * [post](https://bn.wordpress.org/plugins/tags/post/)[query](https://bn.wordpress.org/plugins/tags/query/)
   [reorder](https://bn.wordpress.org/plugins/tags/reorder/)[sort](https://bn.wordpress.org/plugins/tags/sort/)
 * টি
 *  [এডভান্সড ভিউ](https://bn.wordpress.org/plugins/sort-query-posts/advanced/)

## Ratings

 ৫ স্টার এর মধ্যে 5।

 *  [  3টি 5-স্টার রিভিউ     ](https://wordpress.org/support/plugin/sort-query-posts/reviews/?filter=5)
 *  [  0টি 4-স্টার রিভিউ     ](https://wordpress.org/support/plugin/sort-query-posts/reviews/?filter=4)
 *  [  0টি 3-স্টার রিভিউ     ](https://wordpress.org/support/plugin/sort-query-posts/reviews/?filter=3)
 *  [  0টি 2-স্টার রিভিউ     ](https://wordpress.org/support/plugin/sort-query-posts/reviews/?filter=2)
 *  [  0টি 1-স্টার রিভিউ     ](https://wordpress.org/support/plugin/sort-query-posts/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/sort-query-posts/reviews/#new-post)

[সব রিভিউ দেখুন](https://wordpress.org/support/plugin/sort-query-posts/reviews/)

## কন্ট্রিবিউটর

 *   [ Tubal ](https://profiles.wordpress.org/tubal/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/sort-query-posts/)