Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Gaia Clary

    (@gaia-clary)

    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.

    Plugin Author James Laws

    (@jameslaws)

    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.

    Thread Starter Gaia Clary

    (@gaia-clary)

    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

    http://downloads.wordpress.org/plugin/ninja-page-categories-and-tags.1.3.1.zip

    – 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 ?

    Plugin Author James Laws

    (@jameslaws)

    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.

    Thread Starter Gaia Clary

    (@gaia-clary)

    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!

    Thread Starter Gaia Clary

    (@gaia-clary)

    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' );
    
            }
    
            endif;
    
    endif;
    
    return $query;
    }
    Plugin Author James Laws

    (@jameslaws)

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Ninja Page Categories and Tags] After upgrade to 1.3.2 category page sort order is broken’ is closed to new replies.