php datetime
|
|
php/architect’s Guide to Date and Time Programming $39.30 If your development involves working with dates and times, then this book is a must-have. In this book, Derick Rethans (contributor to PHP’s core date extension and well-known PHP expert) explores in great detail the subtle nuances of working with dates and times. Frequently PHP developers encounter unexpected results that adversely affect their software and web applications. This book will undoub… |

Time-Saving WordPress Tricks for PSD to WordPress Conversion Worth Paying Attention
PSD to WordPress conversion is the right way to easily develop and maintain WordPress driven website. Most of the WordPress developers are using different time-saving WP tricks to convert PSD to WordPress theme/ template to build a dynamic web portal. These coding tips work as time-saving techniques very helpful in solving challenges faced during conversion, integration, customization and implementation of HTML/ XHTML/ CSS mark-up PSD files.
At present, there are hundreds or thousands of useful WP tricks are easily available out for WordPress developers helpful in enhancing website’s functionality and accessibility quickly. Interestingly, every WP coding techniques used to unleash power of WordPress and streamlined overall PSD-to-WordPress conversion works. By using these helpful tricks, a web developer can easily streamline his overall work of converting PSD to WordPress up-to great extent.
Here a list of time-saving useful WP tricks for PSD to WordPress conversion worth paying attention can be explored as below:
1. List upcoming post: By copying and pasting the below codes in sidebar.php (theme files), one can easily display upcoming post in the list format on his website. It’s good to update your visitors with what’s next going to publish in a few days.
- < div id = ” zukunft ” >
- < div id = ” zukunft_header” > < p >Future events < /p > < /div >
- < div >
- < p class > < b > < /b > < br / >
- < span class = “datetime” > < /span > < /p >
- < /div >
- < p > No future events scheduled.< /p >
- < /div >
2. Display most popular posts without a Plug-In: Just paste below codes in sidebar.php (theme files) to display most popular posts without using WordPress Plug-ins.
- // for use in the loop, list 5 post titles related to first tag on current post
- $tags = wp_get_post_tags( $post -> ID );
- if ( $tags ) {
- echo ‘Related Posts’;
- $first_tag = $tags[0] -> term_id;
- $args=array (
- ‘tag__in’ => array ( $first_tag ),
- ‘post__not_in’ => array ( $post -> ID ),
- ’showposts’ => 5,
- ‘caller_get_posts’ => 1
- );
- $my_query = new WP_Query( $args );
- if( $my_query -> have_posts () ) {
- while ( $my_query -> have_posts()): $my_query -> the_post ();? >
- < p > < a href = ” ” rel = “bookmark” title = “Permanent Link to ” > < /a > < /p >
- endwhile;
- }
- }
- >
3. How to set an expiration time for particular post: Simply copy and replace the current WordPress loop with the below mentioned codes. By this, one will be able to set a specific expiration date and time to publish or un-publish particular post.
01 04 $expirationtime = get_post_custom_values(‘expiration’); 05 if (is_array($expirationtime)) { 06 $expirestring = implode($expirationtime); 07 } 08 09 $secondsbetween = strtotime($expirestring)-time(); 10 if ( $secondsbetween > 0 ) { 11 // For example… 12 the_title(); 13 the_excerpt(); 14 } 15 endwhile; 16 endif; 17? >
4.How to display recent published post from specify category: Copy and paste the below set of codes to display recent post from a specific category on the sidebar.
- query_posts(’showposts=5&orderby=date&cat=3′);
- while(have_posts()): the_post();
- ? >
- < ul >
- < li > < h3 > < a href =” ” rel=” bookmark ” > < /a > < /h3 >
- < ul > < li > < /li >
- < /ul >
- < /li >
- < /ul >
It’s good to consider the above mentioned checklist of time-saving useful WordPress tricks by every WordPress developer while converting PSD to WordPress theme/ template.
About the Author
More more information about PSD to WORDPRESS & Hire Web Developer visit csschopper.
php datetime Questions
MySQL & PHP Question!?
I have 2 tables — Posts & Comments.
Posts contains:
postid(int)
userid(int)
body(text)
date(datetime)
Comments contains:
commentid(int)
postid(int)
body(text)
date(datetime)
What is the best way to display the posts sorted by recent comment activity??
Thanks in advance!
select p.*, c.* from post p, comments c where p.postid=c.postid order by c.date desc
php datetime Videos
Data si timpul in PHP – Functia date, time, mktime si strftime
It has never been easier to shop for php datetime,
So run don”t walk and pick up php datetime at bargain
prices!
|
|
php/architect’s Guide to Date and Time Programming $39.30 If your development involves working with dates and times, then this book is a must-have. In this book, Derick Rethans (contributor to PHP’s core date extension and well-known PHP expert) explores in great detail the subtle nuances of working with dates and times. Frequently PHP developers encounter unexpected results that adversely affect their software and web applications. This book will undoub… |