Title: awelsh's Replies | WordPress.org

---

# awelsh

  [  ](https://wordpress.org/support/users/awelsh/)

 *   [Profile](https://wordpress.org/support/users/awelsh/)
 *   [Topics Started](https://wordpress.org/support/users/awelsh/topics/)
 *   [Replies Created](https://wordpress.org/support/users/awelsh/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/awelsh/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/awelsh/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/awelsh/engagements/)
 *   [Favorites](https://wordpress.org/support/users/awelsh/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)

1 [2](https://wordpress.org/support/users/awelsh/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/awelsh/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/awelsh/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BackWPup – WordPress Backup & Restore Plugin] Multi-Site + WPCron -> Multiple Backups](https://wordpress.org/support/topic/multi-site-wpcron-multiple-backups/)
 *  [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/multi-site-wpcron-multiple-backups/#post-10101580)
 * Same here. I didn’t know what was happening to start with, until I noticed my
   logs showing 17 backups one after the other (I have a multisite with 17 sites)
   for scheduled jobs. The worst thing is I have set my backups to keep the last
   10 for daily, weekly and monthly backups. Now all my backups have been wiped 
   with the same or similar backups for the same day, week or month.
 * I don’t want to use third part con services. If this can’t be fixed soon, I’m
   going to have to find another backup plugin which is a shame because your plugin
   has worked great up until now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SlimStat Analytics] View all multisites as one site](https://wordpress.org/support/topic/view-all-multisites-as-one-site/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/view-all-multisites-as-one-site/#post-6472954)
 * Has this add-on been updated yet to work with Slimstat 4.x?
 * Thanks,
    Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SlimStat Analytics] View all multisites as one site](https://wordpress.org/support/topic/view-all-multisites-as-one-site/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/view-all-multisites-as-one-site/#post-6472838)
 * Great. I will keep an eye out for when the add-on is updated to work with 4.x.
 * Is there any chance that it will work on the main blog site, or do you have to
   be logged into the network admin area? The reason I ask is, I have users that
   I want to be able to see what this add-on shows, but they are not not admins 
   so can’t login into the network admin area.
 * Thanks,
    Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Sitemap Page] Sort order](https://wordpress.org/support/topic/sort-order-22/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/sort-order-22/#post-6355037)
 * Hi Eddiebouncer,
 * I just did a search for where $sort was being used and added the extra $order
   argument.
 * You first need to get and store the shortcode attribute. I my case I called it
   order. The plugin author was already getting the sort attribute, so I copied 
   his code and configured it get the order attribute.
 * Look for the line where
 * `$sort = (isset($atts['sort']) ? sanitize_text_field($atts['sort']) : null);`
 * And then add the following after or before it
 * `$order = (isset($atts['order']) ? sanitize_text_field($atts['order']) : null);`
 * You then need to jump down 50 or so lines for the following (around line 470)
   and add the $order variable to function calls that also have $sort.
 *     ```
       // check if the attribute "only" is used
       	switch ($only_cpt) {
       		// display only PAGE
       		case 'page':
       			return wsp_return_content_type_page($is_title_displayed, $is_get_only_private, $display_nofollow, $wsp_exclude_pages, $sort, $order).$copyright_link;
       			break;
       		// display only POST
       		case 'post':
       			return wsp_return_content_type_post($is_title_displayed, $display_nofollow, $display_post_only_once, $wsp_exclude_pages, $sort, $order).$copyright_link;
       			break;
       		// display only ARCHIVE
       		case 'archive':
       			return wsp_return_content_type_archive($is_title_displayed, $display_nofollow).$copyright_link;
       			break;
       		// display only AUTHOR
       		case 'author':
       			return wsp_return_content_type_author($is_title_displayed, $display_nofollow, $sort, $order).$copyright_link;
       			break;
       		// display only CATEGORY
       		case 'category':
       			return wsp_return_content_type_categories($is_title_displayed, $display_nofollow, $sort, $order).$copyright_link;
       			break;
       		// display only TAGS
       		case 'tag':
       			return wsp_return_content_type_tag($is_title_displayed, $display_nofollow).$copyright_link;
       			break;
       		// empty
       		case '':
       			// nothing but do
       			break;
       		default:
       			// check if it's the name of a CPT
   
       			// extract CPT object
       			$cpt = get_post_type_object( $only_cpt );
   
       			if ( !empty($cpt) ) {
       				return wsp_return_content_type_cpt_items( $is_title_displayed, $display_nofollow, $cpt, $only_cpt, $wsp_exclude_pages, $sort, $order );
       			}
   
       			// check if it's a taxonomy
       			$taxonomy_obj = get_taxonomy( $only_cpt );
   
       			if ( !empty($taxonomy_obj) ) {
       				return wsp_return_content_type_taxonomy_items($is_title_displayed, $display_nofollow, $taxonomy_obj, $wsp_exclude_pages);
       			}
       			// end
       	}
       ```
   
 * Do a search for each of those functions and add the $order variable to their 
   argument list. For example, around line 900 you can find the custom post type
   function.
 * `function wsp_return_content_type_cpt_items( $is_title_displayed=true, $display_nofollow
   =false, $cpt, $post_type, $wsp_exclude_pages, $sort=null, $order=null )`
 * Inside each of those functions you need to add the following before the call 
   to $posts_cpt = get_posts( $args ) is made.
 *     ```
       // change the sort order
       if ($order!=null){
       	$args['order'] = $order;
       }
       ```
   
 * That should be about all. If you know some PHP it shouldn’t be hard to implement.
   But hopefully the plugin will be able to implement this kind of feature.
 * Regards
    Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] GetText bug for nav](https://wordpress.org/support/topic/gettext-bug-for-nav/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/gettext-bug-for-nav/#post-6099286)
 * Hi Shazzad,
 * Did you confirm this as a bug?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Nav type=plain not working in multisite](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/#post-5744275)
 * I currently have one page where I have four lists with pagination and ajax=1 
   and have no issues with the add_args = ” All lists behave correctly and don’t
   lose their position as I navigate through them.
 * With a page that has multiple lists with pagination and ajax=0, when the page
   reloads when clicking a pagination link, the other lists loose their position
   and reset to 1. Is this what you are talking about? If so, I don’t see that an
   issue since the page has reloaded.
 * Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Nav type=plain not working in multisite](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/#post-5744273)
 * Thanks Shazzad,
 * This problem has been bothering me for a few weeks. I tried looking for another
   plugin, but couldn’t find anything as good as yours, so I just spent a few hours
   isolating the issue.
 * I’m not sure why this problem didn’t arise on a single site compared with multisite.
   I can’t see anything there that would make a difference.
 * Anyway, I’m glad the issue is fixed.
 * Regards,
    Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Nav type=plain not working in multisite](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/#post-5744271)
 * Hi, Shazzad,
 * Thanks for getting back to me. Unfortunately my site is only running on localhost
   at the moment.
 * I managed to trace the issue to the following in wordpress’s general-template.
   php, around line 2680.
 *     ```
       if ( $add_args )
       	$link = add_query_arg( $add_args, $link );
       	$link .= $args['add_fragment'];
       ```
   
 * It is changing the correct links with the $add_args array. WordPress generates
   this array by the ?page16=3 in the url.
 * I think what you need to do is add an empty ‘add_args’ to the array (see below
   in your code from the navigation() function ) you send paginate_links. This will
   then stop wordpress adding its default.
 *     ```
       $return = paginate_links( array(
       				'type' 		=> $nav_type,
       				'base' 		=> $base,
       				'format' 	=> $base,
       				'current' 	=> $paged,
       				'total' 	=> $max_num_pages,
       				'end_size' 	=> 2,
       				'mid_size' 	=> 2,
       				'prev_text' => $prev_text,
       				'next_text' => $next_text,
       				'add_args'	=> ''
       			));
       ```
   
 * When I do this, my problem is solved!
 * Thanks for your help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Nav type=plain not working in multisite](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/#post-5744269)
 * Ok, I’m in the process of trying to debug this problem since I haven’t heard 
   back from anyone. When I list a page for the first time, the paginate_links()
   returns the following (ps. I’ve also added the $base, $paged and $max_num_pages
   variables to the error log):
 *     ```
       [16-Feb-2015 22:38:32 UTC] base = ?page16=%#%
       [16-Feb-2015 22:38:32 UTC] paged = 1
       [16-Feb-2015 22:38:32 UTC] max_num_pages = 7
   
       [16-Feb-2015 22:38:32 UTC] <span class='page-numbers current'>1</span>
       <a href='?page16=2'>2</a>
       <a href='?page16=3'>3</a>
       <span class="page-numbers dots">…</span>
       <a href='?page16=6'>6</a>
       <a href='?page16=7'>7</a>
       <a href="?page16=2">Next</a>
       ```
   
 * Now when I click on page 2 link, paginate_links() lists the following:
 *     ```
       16-Feb-2015 22:38:44 UTC] base = ?page16=%#%
       [16-Feb-2015 22:38:44 UTC] paged = 2
       [16-Feb-2015 22:38:44 UTC] max_num_pages = 7
   
       [16-Feb-2015 22:38:44 UTC] <a href="?page16=2">Previous</a>
       <a href='?page16=2'>1</a>
       <span class='page-numbers current'>2</span>
       <a href='?page16=2'>3</a>
       <a href='?page16=2'>4</a>
       <span class="page-numbers dots">…</span>
       <a href='?page16=2'>6</a>
       <a href='?page16=2'>7</a>
       <a href="?page16=2">Next</a>
       ```
   
 * As you can see, the links for all pages are 2 and this is why I can’t get past
   the second page. If I click on page 4 to start with instead of 2, then all the
   links returned are 4.
 * I’m not sure if this is an issue with your plugin or with wordpress. As I said
   in my first post, the problem doesn’t seem to exist if I run a single site instead
   of a multisite.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Nav type=plain not working in multisite](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/nav-typeplain-not-working-in-multisite/#post-5744250)
 * Hi Shazzad,
 * Have you been able to replicate the issue I reported a week ago? Is your plugin
   compatible with a multisite?
 * Thanks,
    Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[footnotes] Superscript numbers not beginning at 1](https://wordpress.org/support/topic/superscript-numbers-not-beginning-at-1/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/superscript-numbers-not-beginning-at-1/#post-5578244)
 * I found the issue to my problem. In the process of trying to find what was causing
   my link issue, I turned on the option “the_post:” in the expert area. I’m not
   sure why, but it was actually listing not only the footnotes for the page being
   viewed in my widget area at the bottom of the page, but it was listing a host
   of other footnotes (from other pages) even further down in the post. Turning 
   it off fixed the issue.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Ordering by modified date and group](https://wordpress.org/support/topic/ordering-by-modified-date-and-group/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/ordering-by-modified-date-and-group/#post-5523135)
 * Wow! Your plugin just keeps better. The new feature works wonderfully. Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Ordering by modified date and group](https://wordpress.org/support/topic/ordering-by-modified-date-and-group/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/ordering-by-modified-date-and-group/#post-5522873)
 * Ok thanks for the reply. I’ll forget about adding the grouping and just stick
   with ordering by modified date.
 * Unfortunately my site is only local at the moment so there is no way for you 
   to have a look. But it wouldn’t be hard for you to replicate it. I just had the
   options:
 * – Order post by modified date
    – Group by year months
 * and then the code above, except it stripped out my brs. It should have been:
 *     ```
       [groups]
       <h3>[group_title] </h3>
       [posts]
       [post_modified_date format="M. j, Y"] - <a href="[post_permalink]">[post_title]</a> <br />
       [/posts]
       <br />
       [/groups]
       ```
   
 * It helps to have a lot posts that have recently been updated to see the problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W4 Post List] Choose more than one post type](https://wordpress.org/support/topic/choose-more-than-one-post-type/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/choose-more-than-one-post-type/#post-5455294)
 * Hi Shazzard,
 * Thank you so much. It will mean I can reduce my dependence on one more plugin.
   Your plugin will be the only one I need now to display my posts in the various
   ways that I do. I’m sure once the option is there, people will find a use for
   it.
 * Thank you for a great plugin,
    Adrian
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Arconix FAQ] Ordering faqs](https://wordpress.org/support/topic/ordering-faqs/)
 *  Thread Starter [awelsh](https://wordpress.org/support/users/awelsh/)
 * (@awelsh)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/ordering-faqs/#post-5456036)
 * Hi John,
 * Thank you so much for your quick response. That worked and now I don’t need to
   rely upon one more plugin. By the way, if you didn’t already know, your plugin
   is great 🙂 Thank your for all the hard work you have put into it.
 * Regards,
    Adrian

Viewing 15 replies - 1 through 15 (of 38 total)

1 [2](https://wordpress.org/support/users/awelsh/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/awelsh/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/awelsh/replies/page/2/?output_format=md)