$args = array( ‘post_status’ => ‘publish,future’, );
$my_id = 162; $post_id = get_post($my_id); $content = $post_id->post_content; $content = apply_filters(‘the_content’, $content); $content = str_replace(‘]]>’, ‘]]>’, $content); //all content…
<div style=”display: table; height: 150px; width:500px; border:1px solid red;”> <div style=” display: table-cell; vertical-align: middle;”> <p style=”border:1px solid green;”>Lorem ipsum…
#topRightmenu ul li + li:before { content: “|”; }
<link rel=”stylesheet” href=”iphone.css” media=”only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)” /> OR <link media=”handheld, screen and (max-device-width:…
Limiting or Truncating strings using PHP Truncation at word breaks Truncation at sentence breaks http://www.the-art-of-web.com/php/truncate/
$str = get_the_content(); $charset = ‘utf-8’; $len = iconv_strlen($content, $charset); $max_len = 97; $max_cut_len = 10; if ($len > $max_len)…
<?php $children = get_pages(‘child_of=’.$post->ID.’&parent=’.$post->ID); if( count( $children ) != 0 ) { ?> <ul> <?php foreach ($children as $pagg) {…
First row : green ul li:first-child { color:green; } Last row : Red ul li:last-child { color:red; } Alternate row…
$my_id = 100; $post_id_100 = get_post($my_id); $content = $post_id_100->post_content; $content = apply_filters(‘the_content’, $content); $content = str_replace(‘]]>’, ‘]]>’, $content); echo $content;