Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'propertyhive_property_imported_jet', 'use_ref_as_slug', 10, 2);
- function use_ref_as_slug( $post_id, $property )
- {
- $my_post = array(
- 'ID' => $post_id,
- 'post_name' => sanitize_title((string)$property->ID),
- );
- // Update the post into the database
- wp_update_post( $my_post );
- }
Add Comment
Please, Sign In to add comment