What are the custom fields in WordPress ?

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:-

ID, ‘key’, true); ?>

What are the template tags in WordPress ?

A template tag is code that instructs WordPress to “do” or “get” something. Like in header.php  we will use the tag bloginfo(‘name’) to get information from user profile.

The the_title() template tag is used to display the post title.

wp_list_cats() are  for display categories.

get_header() for getting header.

get_sidebar() for display the sidebar on page.

get_footer() for get the footer content on page.

What is file structure in WordPress ?

The main files used in wordpress are:-

  1. index.php :- for index page.
  2. single.php :- for single post page.
  3. page.php :- display the static pages.
  4. category.php :-  Display the category page.
  5. archive.php :- For archive page display.
  6. tag.php :- For display the tags page.
  7. author.php :- For display author page.
  8. search.php :- For display the search result page.
  9. 404.php :- For display 404 error page.
  10. taxonomy.php :- For display the taxonomy archive.
  11. attachment.php :- For managing the single attachments page.
  12. header.php :- For managing top part of page.
  13. footer.php :- For manage bottom part of pages.

Tell some commonly used functions in WordPress ?

WordPress have lot of inbuilt functions. some of commonly used function in wordpress are:-

  1. wp_nav_menu()  :- Displays a navigation menu.
  2. is_page() :- Condition for check if page is displayed. Its return true or false only.
  3. get_the_excerpt() :- Copy the excerpt of the post into a specified variable.
  4. in_category() :- Tests if the specified post is assigned to any of the specified categories or not.
  5. the_title():- Displays the title of the post.
  6. the_content():-  Displays the contents of the post.