I want to create a function and modify a post on the wordpress site based on the post id, and it is in the single.php loop.
default values:
single.php file
$dlm128=get_post_meta($post_id,'music128',true); $dlm320=get_post_meta($post_id,'music320',true);
If specific conditions are met( $constantvalue= "anothervalue" ), I want to update the post; else, I want to leave it the same.
How can I acquire a post by id in a loop and edit the content of that post using if conditions? (I want this post(by postid) have different result by conditions that I declared)
source https://stackoverflow.com/questions/70353064/create-a-function-and-modify-a-post-on-the-wordpress-site-based-on-the-post-id
Comments
Post a Comment