Hello,
I will take a look at this and get back to you soon.
Cheers!
Roman
Here is the solution. You need to copy this code to your theme’s function.php:
function search_exclude_clone_value($new_post_id, $old_post_object) {
global $pluginSearchExclude;
$method = new ReflectionMethod('SearchExclude', 'getExcluded');
$method->setAccessible(true);
$excluded = $method->invoke($pluginSearchExclude);
$exclude = false !== array_search($old_post_object->ID, $excluded);
do_action('searchexclude_hide_from_search', array($new_post_id), $exclude);
}
add_action( "dp_duplicate_post", "search_exclude_clone_value", 10, 2);
add_action( "dp_duplicate_page", "search_exclude_clone_value", 10, 2);
Next update of SearchExclude will support a more elegant solution. But anyway, please try the one above and let me know how it works for you.
-
This reply was modified 9 years, 4 months ago by
pronskiy.
Thread Starter
eamax
(@eamax)
Worked perfectly. Thank you.
When update happens I can remove the code?
-
This reply was modified 9 years, 4 months ago by
eamax.
eamax,
Great, you’re welcome!
Most likely not. The plan was to make code shorter. But I will consider the idea of removing code at all.
Anyway, the updated version will be backward compatible and the solution above will stay working.
Cheers!
Roman
-
This reply was modified 9 years, 4 months ago by
pronskiy.