Set default date in datepicker of an advanced custom field

It depends on the datepicker plugin you are using. Mostly all datepickers will have a default value you can play with. Usualy it is set within the input text type that hosts the datepicker. <input type=”text” class=”datepicker” default-value=”2013/07/25″> And in wordpress’ php you can do : <input type=”text” class=”datepicker” default-value=”<?php echo date(“Y/m/d”); ?>”>

Displaying Custom Fields on Post with Genesis Child Theme

How about instead of genesis_custom_field(‘instrument’); use: echo genesis_get_custom_field(‘instrument’); Plus the genesis_after_post_title action hook is deprecated since 1.7.0 and you should use genesis_entry_header with correct priorities. For more information please use the reference links below. Reference: genesis_after_post_title Genesis 2.0 Hooks reference

Query current and future events, ordered by begin date

This happens because of the OR relation on meta_query and the way WordPress generates the actual query string. You need to leave out the meta_key and orderby from the query args and hook into the posts_clauses filter to modify the where and orderby pieces of the query: function wpse_130954_orderby_fix($pieces){ global $wpdb; $pieces[‘where’] .= ” AND … Read more

Comparing arrays with meta_query in pre_get_posts

The ACF Documentation recommends checking the values individually rather than simultaneously using an array. The following code is from the ACF Documentation for the Checkbox field type: http://www.advancedcustomfields.com/resources/field-types/checkbox/ /* * Query posts for a checkbox value. * This method uses the meta_query LIKE to match the string “red” to the database value a:2:{i:0;s:3:”red”;i:1;s:4:”blue”;} (serialized array) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)