Essentional fuction in wordpress


1.the_title():Display or retrieve the current post/page title with optional markup.

2.the_content():-Display the post content.

3.the_filed():-display the post/page content.

  1. get_field():-Returns the value of a specific field.

echo get_field(“field_name” );
echo get_field(“field_name”,post_ID );

This example shows how to load the value of field ‘text_field’ from the current post.

$value = get_field( “text_field” );
Get a value from specific post.

$value = get_field( “text_field”, 123 );
check if value exits.

$value = get_field( “text_field” );

if( $value ) {
echo $value;
} else {
echo ’empty’;
5.the_post_thumbnial():- Display the post thumbnail.

functionthe_post_thumbnail( $size= ‘post-thumbnail’, $attr= ”) {echoget_the_post_thumbnail( null, $size, $attr);}
6.the_permalink():- Displays the permalink for the current post.

//for particular post id.

7.wp_trim_words():-Trims text to a certain number of words.

wp_trim_words( string $text, int $num_words = 55, string $more = null )

8.The basic loop :- The have_post() function checks whether there are any posts. 9.the_author():-Display the name of the author of the current post.

10.the_date():-Display or Retrieve the date the current post was written

(once per date).

11.get_the_date():-Retrieve the date on which the post was written.

get_the_date( null,get_the_ID() );


12.get_header():-Load the header template.

13.get_footer():-Load the footer template.

14.get_template_part()-get a template part into the template.