WordPress.org

Ready to get started?Download WordPress

Forums

WP Sitemap Page
Ordering Category and Post (8 posts)

  1. msrosyidi
    Member
    Posted 1 year ago #

    Is there any way to order the category using a custom order and the posts using older to newer post in the sitemap page?
    Thanks.

    http://wordpress.org/extend/plugins/wp-sitemap-page/

  2. Tony
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. msrosyidi
    Member
    Posted 1 year ago #

    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.

  4. msrosyidi
    Member
    Posted 1 year ago #

    ...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.

  5. Tony
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  6. msrosyidi
    Member
    Posted 1 year ago #

    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.

  7. msrosyidi
    Member
    Posted 1 year ago #

    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.

  8. pcpostar
    Member
    Posted 6 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic