Extract the last published post

This is how I do it. You may want to reset and call it as a function in case you want to reuse. // Most Recent function nt_mostrecent( $count ) { $my_query = new WP_Query( array(showposts => $count, order => ‘DSC’, orderby => ‘date’)); while ($my_query->have_posts()) : $my_query->the_post(); $posts .= ‘<a href=”‘ . get_permalink() . … Read more

marking a post that was sticky on category template

Check if »sticky« There’s the is_sticky()–Conditional Tag, which you can read about in core here. How-to mark as »sticky« This works for posts, that have the “stick to the front page” check box checked: How »sticky« works internally So basically the function checks if the post-ID is inside get_option( ‘sticky_posts’ );. That means that you … Read more

display jumps to the bottom, dosnt start at the top?

Install web developer add on in firefox and disable all script from drop down menu then refresh the page. see the result it is not moving to the video , it means there is some javascript code in your theme that make it to move down to the video.

Order posts by date

Three loops http://codex.wordpress.org/Class_Reference/WP_Query#Time_Parameters $time = time(); foreach ( range( 0, 2 ) as $yesterday ): // get relative time offset by $yesterday days $rel_time = strtotime( “-$yesterday days”, $time ); // get the digits $year = date( ‘Y’, $rel_time ); $day = date( ‘d’, $rel_time ); $month = date( ‘m’, $rel_time ); // get the … Read more

WordPress Excerpt Paragraph Limiting

Check out this tutorial: http://jshamsul.com/2012/02/08/wordpress-get-first-paragraph-from-post/ There the author puts all the paragraphs into array. So you could possibly pull out the first, second, thrid… paragraphs from that array. As for smashingmagazine.com styling the first paragraph. They do it with CSS :first-child pseudo-class like this: p:first-child { /* your styles */ } More info about :first-child … Read more