Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119608

mpol on "[Plugin: Related] Conflict with Advanced Custom Forms"

$
0
0

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.
http://wordpress.org/extend/plugins/related/


Viewing all articles
Browse latest Browse all 119608

Trending Articles