Decided to go for it and dive into the world of the WordPress block editor based on the improvements in version 5.4 – First, the upgrade went smoothly. Second, switching to the new block editor was easy. Third, making this post seems pretty painless. I disabled full-screen mode because I simply don’t like it ;-} […]
If you are unable to update a plugin via the WP admin console, then you can do the update manually. Download the zip file to your local hard drive and extract it. Then, from the command line, do the test run first:
PROBLEM Wordpress site broken with Javascript errors with zero plugins or themes installed. The issue followed different devices, OS’es and different browsers. SOLUTION User account corrupted. The wp_usermeta locale field had an invalid value of “regular”, and nulling the field solved the issue. DETAILS JS console shows this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[Error]TypeError:Language code must have format2-3letters and.optionally,hyphen,underscore followed by2more letters
All credit to Graham Walters for this excellent plugin and post, upon which this post is based – thank you, sir! https://grahamwalters.me/lab/disable-wpautop-on-specific-postspages/ Recently, a client was having problems using a plugin called by a shortcode. As it turned out, the JavaScript embedded in the returned content was being broken by the WordPress auto-paragraph feature known […]
Normally, there is an option in the Screen Options menu to show or hide the Custom Fields tool. If this option is missing, you may have the plugin Advanced Custom Fields (ACF) version 5.5.13 or greater installed and active because ACF removes the Custom Fields tool to improve page load speed. If you do have […]
Needed to build a feature for a Bookstore tool to have an optional sequence number for the Custom Post Type “books” that would allow items with a seq number to float to the top of the list and be sorted by seq #. The rest of the books would show underneath, sorted alphabetically.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$querytop=get_posts(array(
'post_type'=>'books',
'numberposts'=>-1,
'orderby'=>'meta_value',
'meta_key'=>'book_seq',
'order'=>'ASC',
'meta_query'=>array(
// meta query takes an array of arrays, watch out for this!
array(
'key'=>'book_seq',
'value'=>array('','NULL'),
'compare'=>'NOT IN'
)
)
));
$querybottom=get_posts(array(
'post_type'=>'books',
'numberposts'=>-1,
'orderby'=>'post_title',
'order'=>'ASC',
'meta_query'=>array(
// meta query takes an array of arrays, watch out for this!