Advanced Custom Fields sort by field group sub field

Run a WordPress Query based on Advanced Custom Fields group sub field.

Example

If you have an ACF group labelled “Date and Time” with a name of “date_and_time”. Inside this group you have sub fields called “Date” (date), “Start Time” (start_time) and “End Time” (end_time).

You can pull a query based on the sub fields using the ‘meta_key’ option like this:
date_and_time_date
date_and_time_start_time
date_and_time_end_time

   $args = array(
        'post_type' => 'event',
        'posts_per_page' => -1,
        'meta_key' => 'date_and_time_date',
        'orderby' => 'meta_value',
        'order' => 'ASC'
    );
    $the_query = new WP_Query( $args );

This assumes your Date field has a return format of “Ymd”.

Hide website listing in Amazon EC2 AMI

By default Amazon’s AMI allows directory listings for your website. In WordPress this exposes you /wp-content/uploads folder to the web. Not a big deal but could be a security risk if you upload anything sensitive to your site for some reason. You need to change the default httpd.conf file:

sudo nano /etc/httpd/conf/httpd.conf

Change the following line:

Options Indexes FollowSymLinks

to

Options FollowSymLinks

as shown below (I’ve left the original line commented out)

# Further relax access to the default document root:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
Options FollowSymLinks

Restart your webserver:

sudo service httpd restart

Outlook 2013 – “Fix Out of Office”

Your automatic reply settings cannot be displayed because the server is currently unavailable. Try again later.

This applies to Outlook 2013 connecting to an Office 365 account.

If you get the message:

Your automatic reply settings cannot be displayed because the server is currently unavailable. Try again later.

Sign user out.
File -> Office Account -> Sign out

Sign back in, check for correct email address.
File -> Office Account -> Sign in

Repair the account
File -> Info -> Account settings -> Account settings… -> Select account -> Repair

Outlook 2013 – “No connection” to shared calendar

This applies to Outlook 2013 connecting to an Office 365 account. If you get a “no connection” message when viewing a shared calendar try the following:

  1. File -> Office Account -> Sign Out
  2. Sign back in with Office 365 details
  3. Info -> Account Settings
  4. Choose account -> “Repair”
  5. Restart Outlook