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!
Step 1. Execute the following two commands: postconf -e smtpd_sender_restrictions=pcre:/etc/postfix/rejected_domains postconf -e reject_unauth_destinations=pcre:/etc/postfix/rejected_domains If that doesn’t work, you may hand-edit main.cf and add/edit these lines:
Quit Mail. Look for a file called MessageRules.plist under ~/Library/Mail. Depending on your Mail version it could be under ~/Library/Mail/V2/Maildata as well. Copy that file. It can be edited with vim or the PList editor. I find it much easier to work with as text in vim.
I needed to automate the addition of new users with a sequential member’s ID in WordPress. Additionally, there were non-numeric entries in that column that had to be ignored. The wp_users.user_login column is a varchar(60) and so does not naturally handle numeric operations well at all. The solution is a combination of REGEXP and cast(): […]