Search This Blog

Friday 9 March 2018

bloginfo() function in wordpress.


Displays information about the current site.



Get data about your site, for the most part assembled from the data you supply in your User Profile and General Settings WordPress Administration Screens. It can be utilized anyplace inside a layout record. This dependably prints an outcome to the program. If you need the values for use in PHP, use bloginfo() function.
bloginfo() function not a PHP function, it's created by WordPress.


Example:

"name" – Get the "Site Title", This data is retrieved from the "blogname" record in the wp_options table.
<?php echo bloginfo('name'); ?>

"description" – Get the "Tagline", This data is retrieved from the "blogdescription" record in the wp_options table.
<?php echo bloginfo('description'); ?>

also you can use (wpurl,url,admin_email,charset,version,html_type,text_direction,language,stylesheet_url,stylesheet_directory,template_url,pingback_url,atom_url,rdf_url,rss_url,rss2_url,comments_atom_url,rdf_url,rss_url,rss2_url,comments_atom_url,comments_rss2_url)

"siteurl" – Deprecated since version 2.2. Echo home_url(), or use bloginfo("url").
"home" – Deprecated since version 2.2. Echo home_url(), or use bloginfo("url").

No comments:

Post a Comment