Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tony Archambeau

    (@funnycat)

    Hello.
    Thanks for this question. I haven’t think about that when I designed this plugin, but it can be an idea to improve it.
    So the short answer is “no”, it’s not possible to change the way the posts are sorted, except if you want to modify the source code of the plugin.
    I can add that functionality in an update of the plugin.

    Hope that help.

    Thread Starter M. S. Rosyidi

    (@msrosyidi)

    Thanks for your kindness to answer.
    I don’t understand about modifying the source code of a plugin, I’m still very a beginner in the world of programming language (PHP etc)… I just begin to learn modifiying a WordPress theme…

    Previously I’ve used http://wordpress.org/extend/plugins/table-of-contents-creator/ but WordPress says “This plugin hasn’t been updated in over 2 years”. This plugin has an option to short the category using the category ID, this meets one of what I want.
    I use http://wordpress.org/extend/plugins/collapsing-categories/ but it only can be used as a widget (I cannot imagine if I have thousands of posts or pages). This plugin meets all of what I want about ordering the list of category and post and also using hierachy but only as a widget.
    I’m sorry and many thanks again for your help.

    Thread Starter M. S. Rosyidi

    (@msrosyidi)

    …except if you want to modify the source code of the plugin.

    May you help me how to make modifications?
    I’m sorry and thanks.

    Plugin Author Tony Archambeau

    (@funnycat)

    Yes, no problem.
    Here is the way to change the source code :
    – You can use a simple text editor. I suggest you to download Notepad++, it atext editor that highlight the source in a way that you can recognise easily the code-
    – Save the original version of the file “wp-sitemap-page.php”.
    – Open “wp-sitemap-page.php” with such an editor.
    – Try to edit the code that sort the category and the post.
    – Save the file and upload it.

    Don’t hesitate to share the code if you success to did it.
    Thanks.

    Thread Starter M. S. Rosyidi

    (@msrosyidi)

    Thanks.
    But actually that’s not what I want to ask. Ah, maybe because I can’t express what I want to ask in English.
    I have opened wp-sitemap-page.php many times, but I don’t understand what to be changed in this file. This is actually what I want to ask.
    I’m sorry and thanks.

    Thread Starter M. S. Rosyidi

    (@msrosyidi)

    About ordering post, according to http://codex.wordpress.org/Template_Tags/get_posts, get_posts has parameter orderby and order…, but how I insert them to wp-sitemap-page.php?
    And about ordering category, I do not find any references.
    I’m sorry and thanks.

    In file wp-sitemap-page.php ( wp-content/plugins/wp-sitemap-page) you will find sections like:

    //===============================================
    // List the posts by category
    //===============================================

    ……

    //===============================================
    // List the pages
    //===============================================
    ……

    //===============================================
    // List the CPT
    //===============================================
    ……
    This are just te “headers” of block of code. You have to move whole block of code, not just the headers, of course 🙂

    You can reorder the order of Pages, categories, events… by reordering those blocks of code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Ordering Category and Post’ is closed to new replies.