Custom field in PHP file
Question
im a beginner with PHP, so i hope that someone can help me solving this issue.
I want to display the expiration date of a post with the following plugin https://wordpress.org/plugins/advanced-schedule-posts/
I’ve think i can use:
$hasp_expire_date = get_post_meta( $post_id, ‘hasp_expire_date’, true );
But i don’t know how to insert it into a php file. I need to place in this code (Where it says CODE HERE):
$num_comments = get_comments_number( $block_data['id'] );
$entry_comments = 'CODE HERE<i class="fa fa-speech-bubble"></i><span>'.$num_comments.' '._nx( 'Comment', 'Comments', $num_comments, 'comments', 'uncode' ).'</span>';
0
get-post, php
4 years
2019-11-05T05:55:19-05:00
2019-11-05T05:55:19-05:00 0 Answers
79 views
0
Leave an answer