The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Ninja Pages
[resolved] [Plugin: Ninja Page Categories and Tags] After upgrade to 1.3.2 category page sort order is broken (8 posts)

  1. Gaia Clary
    Posted 4 years ago #

    I have setup the page order by using the Page Attributes -> Order. That worked until a few days ago when i updated the plugin to 1.3.2 Since then it looks like the page order number is no longer evaluated. Here is an example category page:


    Regardless what order value i enter, the page order keeps constant.
    I tried with the Atahualpa theme (3.5.3 as well as the new 3.7.8)


  2. Gaia Clary
    Posted 4 years ago #

    I now see that stepping back to plugin version 1.3.1 does not help fixing that particular issue. I have even disabled all other plugins and the issue remains. So maybe it is a wordpress problem at the end ? I am clueless.

  3. James Laws
    The WP Ninjas
    Plugin Author

    Posted 4 years ago #

    No other changes have taken place, like an updated theme or other upgrades? Obviously if it worked it shouldn't suddenly stop.

    How did you role back to version 1.3.1? Meaning did you delete all the files and upload the older version?

    It is strange because the order attribute is working on fine on all my sites.

  4. Gaia Clary
    Posted 4 years ago #

    Hi. thanks for the quick answer!

    Here is what i did:

    - I deactivated and deleted the 1.3.2 plugin,
    - I downloaded the 1.3.1 zip file from


    - I unzipped and added the folder into the workdpress plugin directory
    - finally activated ninja again.

    By now i also tried a couple of themes but all of them give me the order by release date and do not care about the order value in the page attributes.

    Can you give me a hint where exactly i should start to look for what is broken ?

  5. James Laws
    The WP Ninjas
    Plugin Author

    Posted 4 years ago #

    One second... Are you talking about displaying children of your pages below the main content or the your main page order somewhere?

    Or are you talking about the order on a category archive page?

    If you are talking about a category archive page, there is no way to use menu order. Archives automatically use date order and since posts don't generally have a menu order it will always use the date published for all content in the archive.

    The order attribute only works for the display of child pages under your parent page when using that option.

  6. Gaia Clary
    Posted 4 years ago #

    I was afraid about that something like that is the problem. Actually while reading your answer i had a "deja vue" from a year ago. It can well be that someone here has modified wordpress to actualy support the ordering of archive pages. So then this modification must have been removed by one of the recent updates...

    I can report here when i found how to do that.
    Thanks for taking care and pointing me into the right direction!

  7. Gaia Clary
    Posted 4 years ago #

    Ok, so our admin found what was changed in a backup file. We have added the patch to the Ninja 1.3.2 plugin now and it works again!!!

    Maybe you can think about adding the functionality into the official Ninja plugin :)

    In basic-function.php:

    function ninja_pages_archives_include_pages( $query ) {
    global $wp_query;
    $options = get_option('ninja_pages_options');
    //Don't break admin or preview pages.
    if ( isset( $options['add_archives'] ) && $query->is_main_query() ) :
        if( is_category() || is_tag() ) :
            if ($query->is_feed) {
                // Do feed processing here.
            } else {
                $post_type = get_query_var( 'post_type' );
                if ( !empty( $post_type ) ) {
                    $post_type = $post_type;
                } else {
                    $post_type = array('post', 'page');
                $query->set( 'post_type' , $post_type );
                // ===========================================
                // Sort Archive pages by menu order ascending
                // Modified for machinimatrix Blog
                // ===========================================
                $query->set( 'orderby' , 'menu_order' );
                $query->set( 'order' , 'ASC' );
    return $query;
  8. James Laws
    The WP Ninjas
    Plugin Author

    Posted 4 years ago #

    Awesome. Glad it's all working the way you like. Not necessarily something I would put into the plugin by default but a great reference for when someone might want to do something similarly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ninja Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic