All Topics
custom hook in inline edit
Hi Support
I’ve written the following code
add_action('acp/editing/saved', 'update_indexlink_with_permalink_on_inline_edit', 10, 3);
function update_indexlink_with_permalink_on_inline_edit($post_id, $column_id, $value) {
// Check if the post type is 'projekt'
if (get_post_type($post_id) === 'projekt') {
// Update the ACF field 'indexlink' with the permalink
$permalink = get_permalink($post_id);
update_field('indexlink', $permalink, $post_id);
}
}
But this is not working… What am I doing wrong?
Best
You must be logged in to reply to this topic.