Support » How-To and Troubleshooting » Custom Field – Setting a default Value

Custom Field – Setting a default Value

  • Could anyone help me with the following please.

    Every post that I write has the same two custom fields, one to embed a video, the other to fetch the thumbnail for it.

    At the moment i have to manually select and fill these. Although not terribly time consuming it really seems to be adding up as i am writing more and more posts as the days go by.

    What I would like is for the post template to already be part filled, with both the keys selected and one of the values filled in, which i can then tweek.

    I don’t know if or where i can access the code to add a default value, or if there is a plugin that would give me control.

    Any pointers would be great and really take the repetition out of the work.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Try this excellent tutorial,

    It does not fill-in a default value. Instead, this tells you the PHP code for an if-then statement. It works like this (translated to English):

    IF custom field exists, then display the custom field. IF the custom field is empty, then display this default instead.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Field – Setting a default Value’ is closed to new replies.
Skip to toolbar