Change normal date to timestamp
$timestamp = strtotime(date("D M d, Y G:i:s a"));
$timestamp = strtotime(date("D M d, Y G:i:s a"));
<?php
function _get_location()
{
$country=file_get_contents('http://api.hostip.info/get_html.php?ip=');
$_country = explode ("\n", $country);
$_country = str_replace("City: ", "", $_country);
return $_country[1];
}
?><?php echo $this->_get_location(); ?><?php
function post_without_image($content) {
ob_start();
echo $content;
$postOutput = preg_replace('/<img[^>]+./','', ob_get_contents());
ob_end_clean();
return $postOutput;
}
?><?php echo post_without_image($content); ?><?php
function get_post_by_category($category_id) {
global $post;
$args = array( 'numberposts' => 1, 'category' => $category_id );
$myposts = get_posts( $args );
return $myposts;
}
?><?php echo get_post_by_category($id); ?>