Custom field - Blog page - Event date

Hi.

i want to add an "event date" for my posts. (i know there are events managers out there, but there are too complicated and not needed cause i only want to show different date instead of the post published date)

I have already thought this through and i see that i can just use custom field inside the post and add there a new custom field, for ex "eventdate" and then give the value to it to show.

I ve also find the php file, content-post.php, and found the specific place that i want to replace which is the following at meta section: 
$output .= '<span class="post-date updated">'. get_the_date() .'</span>'; 

where the function get_the_date() i want to put there the custom field that i create in the post

i ve searched and found that probably is the "get_post_custom_value()" but when i enter it (i ve tried several ways)... 
get_post_custom_value('eventdate', $post_id)
get_post_custom_value('eventdate')
get_post_custom_value()

i m getting the result saying only "Aray"
what should i do to present the result i want for ex "3 September 2016"

also just an added question, because this file is in Betheme and i dont want to lose in a future update i will just copy it to the child folder or should i do an addition proceedure for it?

thank you for your help!! :)

Comments

  • Hi,

    what you ask for, requires files customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact with your web developer.

    Thanks for understanding!
  • i do realize that this configuration has to do with files customization..

    but i don't request you to do it, if i was i would gladly pay you. but.. 

    i 've already done it.. all i want is help by telling me which function command should i replace to the specific place. nothing more. why is it that difficult to say?

    thanks
  • There is nothing difficult if you know coding but we need to follow the rules without any exceptions. If we will give you such information, after that we will get thousands of questions like: where to do this, in which file do that, in which line should we replace this code, etc. So please understand that files customization are not included and never won't be. And also, we do not offer any extra customization because we are too busy with current work.

    Thanks for understanding!
  • Hi there again!

    i found the solution and i'm pasting it here in case someone needs it (if this is open discussion and not private one)

    for single use: <?php echo get_post_meta(get_the_ID(),'enter here the custom field key',true); ?>

    or for use inside the article i was reffering to: get_post_meta(get_the_ID(),'enter here the custom field key',true)

    btw: i do understand your point of view and i respect it. keep up doing great updates for the themes :)

    all the best!
  • Thanks, we are happy to see that you sorted it yourself :)
Sign In or Register to comment.