Skip to main content
added 8 characters in body
Source Link
s_ha_dum
  • 65.5k
  • 13
  • 84
  • 174

The add_meta_box()add_meta_box() function needs a callback function as an argument to display the meta box on the edit page of a custom type post. My problem is I can not display anything, say in the input type=textinput type=text (for example the values of an already posted post), because I don't have the ID of the post...

get_post_metaget_post_meta needs the ID of the post to display the values! 

How can I get the ID of the post?

The add_meta_box() function needs a callback function as an argument to display the meta box on the edit page of a custom type post. My problem is I can not display anything, say in the input type=text (for example the values of an already posted post), because I don't have the ID of the post...

get_post_meta needs the ID of the post to display the values! How can I get the ID of the post?

The add_meta_box() function needs a callback function as an argument to display the meta box on the edit page of a custom type post. My problem is I can not display anything, say in the input type=text (for example the values of an already posted post), because I don't have the ID of the post...

get_post_meta needs the ID of the post to display the values! 

How can I get the ID of the post?

Source Link
user25893
user25893

Adding meta boxes to custom post type

The add_meta_box() function needs a callback function as an argument to display the meta box on the edit page of a custom type post. My problem is I can not display anything, say in the input type=text (for example the values of an already posted post), because I don't have the ID of the post...

get_post_meta needs the ID of the post to display the values! How can I get the ID of the post?