WordPress Themes Development Question:

Download Job Interview Questions and Answers PDF

Explain what are the custom fields in wordpress?

WordPress Theme Development Interview Question
WordPress Theme Development Interview Question

Answer:

We will add extra information to your post by using custom fields. Custom Fields are a form of meta-data that allows you to store arbitrary information with each WordPress post.
Meta-data is handled with key/value pairs. The key is the name of the meta-data element. The value is the information that will appear in the meta-data list on each individual post that the information is associated with.
To display the Custom Fields for each post, use the the_meta() template tag.
To fetch meta values use the get_post_meta() function.
For example we use custom fields:-
<?php echo get_post_meta($post->ID, ‘key’, true); ?>

Download WordPress Theme Development Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what is the simplest way to find out the number of parameters passed into a function?Tell me how to call a constructor for a parent class?