Add custom ID to CPT posts only create not update

Yes, it’s simple – check for existence of id_valoraciones meta value when saving post. If post does not have id_valoraciones set, do your job with getting last value and incerementing it. If the post has id_valoraciones meta, then – do nothing. Like this: <?php function auto_assign_ids( $post_id, $post, $update ) { // Only assign ID … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)