i have a custom post type called books with fields genre,author,bookname i want to dynamically create the link booklink based on the data in the 3 above field and put this booklink into the database for the post on publish or update.

how do i do it

my code

<?php
$genre = get_field('genre');
$bookname=get_field('bookname');
$author=get_field('author);
$booklink="http://mybooks/".$genre."/".$author."/".$bookname.".com";
?>

i donno how to get this booklink field created and updated with the data in the database for each post on publish/update.

plz guide.

Read more here: populate custom field on publishor update


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: