Conflict with Advanced Custom Forms
-
Since 3.5 I had a conflict with Related and Advanced Custom Forms. When saving a post, it deleted the featured image.
I fixed it for myself, by changing part of the displayMetaBox function:
`$args = array(
‘numberposts’ => -1,
‘offset’ => 0,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
‘post_type’ => ‘producten’,
‘post_status’ => ‘publish’,
‘suppress_filters’ => true );$posts = get_posts($args);
if ($posts) {
foreach ($posts as $p) {
echo ‘
<option value=”‘ . $p->ID . ‘”>’ . $p->post_title . ‘ (‘ . ucfirst(get_post_type($p->ID)) . ‘)</option>’;
}
}`This si the part where it build the option list for the selectable posts. It used the WP_Query class, but now get_posts.
https://www.ads-software.com/extend/plugins/related/
- The topic ‘Conflict with Advanced Custom Forms’ is closed to new replies.