Alphabetical order of posts and other change
-
Hi Tony,
Great plugin!
I’m working on a biology site and found that I can list categories and post using this plugin. But there is no way of ordering the posts alphbetically. They are ordered in reverse date order. Also, I couldn’t find a way of not showing the word: “Category:” in the list.
So I made a couple of changes to the code, hoping that you’d like to include this as native options that can be changed via the Sitemap page settings on the next upgrade.
This is how the page looks, it is basically a table of contents that allow people to find the species: https://panamasilvestre.com/indice/
To enter while it is in construction, please enter first to https://panamasilvestre.com/tempo
The changes I made are:
Changed:
Line 1044
.sprintf( __('Category: %1$s', 'wp_sitemap_page'), '<a href="'.get_category_link($page->cat_ID).'"'.$attr_nofollow.'>'.$page->name.'</a>' )
To:
.sprintf( __('%1$s', 'wp_sitemap_page'), '<a href="'.get_category_link($page->cat_ID).'"'.$attr_nofollow.'>'.$page->name.'</a>' )
After line 1105 added:
$args = array( 'posts_per_page' => -1, 'orderby'=> 'title', 'order' => 'ASC' );
Thanks in advance,
Humberto
- The topic ‘Alphabetical order of posts and other change’ is closed to new replies.