opus13i
Forum Replies Created
-
Hey, This is pretty cool.
Is there a way to maintain this script change via the child theme?
Thanks!
Forum: Plugins
In reply to: [PDF Forms Filler for CF7] Define Font Sizes for fields?Dammit. After fumbling around in Acrobat I found where to add the property
(marking as closed)
Ah, no, it was a custom code bit I had hired out many moons ago, and has since been proven to be way useful on a variety of projects. It has become a part of my default child theme template since, and this is the first time there has ever been a conflict with it.
Thanks for the help!
Aha! The conflict is from a set of functions in my child theme. The functions are for automatically creating bi-directional ‘relationships’ for ACF and to merge values for searching compatibility.
/* bidirectional relationships ---------------------------------------------------------- */ function bidirectional_acf_update_value($value, $post_id, $field) { $field_name = $field['name']; $field_key = $field['key']; $global_name = 'is_updating_'.$field_name; if (!empty($GLOBALS[$global_name])) return $value; $GLOBALS[$global_name] = 1; if (is_array($value)) { foreach($value as $post_id2) { $value2 = get_field($field_name, $post_id2, false); if (empty($value2)) { $value2 = array(); } if (in_array($post_id, $value2)) continue; $value2[] = $post_id; update_field($field_key, $value2, $post_id2); } } $old_value = get_field($field_name, $post_id, false); if (is_array($old_value)) { foreach($old_value as $post_id2) { if (is_array($value) && in_array($post_id2, $value)) continue; $value2 = get_field($field_name, $post_id2, false); if (empty($value2)) continue; $pos = array_search($post_id, $value2); unset($value2[$pos]); update_field($field_key, $value2, $post_id2); } } $GLOBALS[$global_name] = 0; return $value; } add_filter('acf/update_value/name=related_to', 'bidirectional_acf_update_value', 10, 3); /* add post types to search ---------------------------------------------------------- */ function rc_add_cpts_to_search($query) { // Check to verify it's search page if (is_search()) { // Get post types $post_types = get_post_types(array('public' => true, 'exclude_from_search' => false), 'objects'); $searchable_types = array(); // Add available post types if ($post_types) { foreach($post_types as $type) { $searchable_types[] = $type - > name; } } $query - > set('post_type', $searchable_types); } return $query; } add_action('pre_get_posts', 'rc_add_cpts_to_search'); /* Combine fields for search --------------------------------------------------- */ function cf_search_join($join) { global $wpdb; if (is_search()) { $join. = ' LEFT JOIN '.$wpdb - > postmeta. ' ON '.$wpdb - > posts. '.ID = '.$wpdb - > postmeta. '.post_id '; } return $join; } add_filter('posts_join', 'cf_search_join'); function cf_search_where($where) { global $pagenow, $wpdb; if (is_search()) { $where = preg_replace( "/\(\s*".$wpdb - > posts. ".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", "(".$wpdb - > posts. ".post_title LIKE $1) OR (".$wpdb - > postmeta. ".meta_value LIKE $1)", $where); } return $where; } add_filter('posts_where', 'cf_search_where'); function cf_search_distinct($where) { global $wpdb; if (is_search()) { return "DISTINCT"; } return $where; } add_filter('posts_distinct', 'cf_search_distinct');
How about a video of it?
https://www.dropbox.com/s/9pykct862hp8a22/Awesome-support-issue-10272018.m4v?dl=0
Forum: Plugins
In reply to: [Custom Post Type UI] Change Posts per page for a CPT?Ok, I shall hunt elsewhere. Thanks for the feedback.
Forum: Plugins
In reply to: [Custom Post Type UI] Change Posts per page for a CPT?Hmm, I haven’t really done anything with queries besides just sorting posts by last date modified nad adding ACF inputs to searches.
All the other changes focus on visual presentation and searchability of the fields.
Forum: Themes and Templates
In reply to: [Shop Isle] Child theme overrides for /inc/structure/Odd, somehow my notification to this post didn’t arrive.
I have done research into pluggable functions, but none of the materials that I have found focus on overriding page structure –only intrinsic functions like email routine mods and the like.
Could someone point me in the right direction if I just want to override a file like the aforementioned /inc/structure/post.php ?
Thanks
Forum: Themes and Templates
In reply to: [Shop Isle] Child theme overrides for /inc/structure/This is for Shop-Isle
Forum: Plugins
In reply to: [Force Login] No method to reset password?That was the trick. Thank you.
You ever figure this out? I am getting the same thing myself
Forum: Plugins
In reply to: [Postie] Postie has made 1000’s of identical postsI just went through and
- Deleted all duplicate posts
- Deleted all abandoned images (every post had a duplicate image)
- Verified that there were no unread emails in the pop account.
Forum: Plugins
In reply to: [Postie] Postie has made 1000’s of identical postsPostie has always deleted the emails in the past. You can see that many of these have identical timestamps on the posts –even if the email isn’t deleting, the email isn’t duplicating.
Thanks
Forum: Themes and Templates
In reply to: [Sydney] Remove certain custom post types?(marking as resolved)