Skip to content
Hey, I'm
KRIS THAPA
  • Home
  • Why Me?
  • About Me
  • Contact Me
  • Services

Author: admin

Display published and future post

November 27, 2012 admin Leave a comment

$args = array( ‘post_status’ => ‘publish,future’, );

Continue Reading →

Posted in: Wordpress

Preserve post/page formatting with limited character

admin Leave a comment

$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…

Continue Reading →

Posted in: Web Development, Wordpress

Vertically Center content in DIV (without table)

October 3, 2012 admin Leave a comment

<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…

Continue Reading →

Posted in: HTML/CSS

Add Content via CSS

September 30, 2012 admin Leave a comment

#topRightmenu ul li + li:before { content: “|”; }

Continue Reading →

Posted in: HTML/CSS

CSS for mobile, iphone

August 16, 2011 admin Leave a comment

<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:…

Continue Reading →

Posted in: Web Development

Truncation text, word, sentence

August 8, 2011 admin Leave a comment

Limiting or Truncating strings using PHP Truncation at word breaks Truncation at sentence breaks http://www.the-art-of-web.com/php/truncate/

Continue Reading →

Posted in: Web Development

Count Character and DO NOT break word

admin Leave a comment

$str = get_the_content(); $charset = ‘utf-8’; $len = iconv_strlen($content, $charset); $max_len = 97; $max_cut_len = 10; if ($len > $max_len)…

Continue Reading →

Posted in: Wordpress

list child pages

July 24, 2011 admin Leave a comment

<?php $children = get_pages(‘child_of=’.$post->ID.’&parent=’.$post->ID); if( count( $children ) != 0 ) { ?> <ul> <?php foreach ($children as $pagg) {…

Continue Reading →

Posted in: Wordpress

CSS tricks ul li and table row

July 13, 2011 admin Leave a comment

First row : green ul li:first-child { color:green; } Last row : Red ul li:last-child { color:red; } Alternate row…

Continue Reading →

Posted in: HTML/CSS

Pull content from specific page, post with preserve formatting

July 12, 2011 admin Leave a comment

$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;

Continue Reading →

Posted in: Wordpress

Post navigation

Page 2 of 4
← Previous 1 2 3 4 Next →

Recent Posts

  • Overlay a layer
  • How to add a color overlay to a background image?
  • Fancy Checkmark Icons

Recent Comments

  • Joy Gordon on How to hide PHP errors on your Joomla site?
  • Elmer Skafidas on How to hide PHP errors on your Joomla site?
  • Anissa Kjellsen on How to hide PHP errors on your Joomla site?
Copyright © 2026 Hey, I'm