Brian Williams
Forum Replies Created
-
Forum: Plugins
In reply to: [Collapsing Categories] php warning is filling error.log on WP 5.0.1I was getting a similar warning after upgrading from PHP7.0 to PHP7.2. In my case, the error was manifesting itself on the home page, in the collapsible categories widget.
The code in question, starting at line 508, is:
$totalPostCount=count($posts);
if ($totalPostCount>5000) {
$options[‘showPosts’]=false;
$showPosts=false;
}This is the only mention of $totalPostCount in the module, so I commented line 508 out and replaced it with:
$totalPostCount=0;
The error then goes away. Hopefully this will not cause me any problems down the line (my total posts are around 2,000 at the moment).
If you are not comfortable editing PHP code on your WordPress site, then I’m afraid I have no simple solution!
Good luck,
Brian.Forum: Plugins
In reply to: [Add Posts to Pages] Sort in Alphabetical Order?Hi John,
I couldn’t get your example to work (I couldn’t find wp-includes). However, inspired by the your example, I edited the add-in code using the Editor (under Plugins on the main WordPress menu).
I replaced the following line
$posts = get_posts('category_name='.$category.'&posts_per_page='.$show.'&tag='.$tag.);with
$posts = get_posts('category_name='.$category.'&posts_per_page='.$show.'&tag='.$tag.'&orderby=name'.'&order=ASC');This then produces an alphabetically sorted list (for all instances of the short code).
I hope people find this useful.
And thanks to John for the inspiration!!
Brian.
Brian Williams
http://www.brian-coffee-spot.comBrian’s Coffee Spot |Devoted to Coffee
PS To see this in action, have a look at: http://www.brian-coffee-spot.com/the-coffee-spot-guide-to/new-york-city/#List
Forum: Plugins
In reply to: [Add Posts to Pages] Sort in Alphabetical Order?I too would love to see a feature allowing the posts to be ordered alphabetically.
Thanks,
Brian.Hi Jeremy,
My site is http://www.brian-coffee-spot.com. I’m having similar problems to those described here.
Let me know if you want any further information.
Thanks,
Brian.If I delete the Jetpack plug-in and reinstall the previous version I was using (1.9.2), will I lose my stats to date (which is what I principally use Jetpack for) or are they stored separately on WordPress.com?
Thanks,
Brian.I’ve now disabled Jetpack and the sliders worked. Re-enabled Jetpack and they stopped working.
Jetpack is now disabled.