Get page title, excerpt or content by id or name in wordpress..!

How-to-Create-Registration-Form-in-Wordpress-Without-Plugin_.png

Yes, We can easily get the Name of the page, Excerpt of the page and Content of the page, etc. by its id or by name.

Below easy and simple code will show you how it works.

Get page title, excerpt or content by id

post_title;

echo $page_excerpt = $var_name->post_excerpt;

echo $page_content = $var_name->post_content;
?>

Get page title, excerpt or content by Name of the Page

post_title;

echo $page_excerpt = $page_name->post_excerpt;

echo $page_content = $page_name->post_content;
?>

That's it..

List your article for Tech Blogs Write For Us at Developer Gang.