<?php
$content = get_the_content();
echo substr(strip_tags($content), 0, 100);
?>
<?php
$content = get_the_content();
echo substr(strip_tags($content), 0, 100);
?>
<?php
foreach((get_the_category(POST-ID)) as $category) {
echo $category->cat_name;
}
?>
The below given code will list all the values added to the given fields
<?php
$custom_fields = get_post_custom(POST_ID);
$fieldsValue = $custom_fields[‘FIELD’];
foreach ( $fieldsValue as $key => $value )
echo $value . “<br />”;
?>
function myFunction() {
}
if(window.myFunction) {
alert(“‘myFunction’ already exists”);
} else {
alert(“‘myFunction’ does not already exists”);
}