Hacks 4 WordPress
1.
Popular Posts
2.
-
3. get_results(“SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 5″);
- <a href="%3C?php%20echo%20get_permalink%28$postid%29;%20?%3E" title="”>
11. {}
4. foreach ($result as $post) {
5. setup_postdata($post);
6. $postid = $post->ID;
7. $title = $post->post_title;
8. $commentcount = $post->comment_count;
9. if ($commentcount != 0) { ?>
10.
12.
13.
14.
——————————————–
1. ID);
4. if ($tags) {
5. echo ‘Related Posts’;
6. $first_tag = $tags[0]->term_id;
7. $args=array(
8. ‘tag__in’ => array($first_tag),
9. ‘post__not_in’ => array($post->ID),
10. ’showposts’=>5,
11. ‘caller_get_posts’=>1
12. );
13. $my_query = new WP_Query($args);
14. if( $my_query->have_posts() ) {
15. while ($my_query->have_posts()) : $my_query->the_post(); ?>
16.
17. <a href="%3C?php%20the_permalink%28%29%20?%3E" rel="bookmark" title="Permanent Link to “>
18.
19.
——————————
1. function catch_that_image() {
2. global $post, $posts;
3. $first_img = ”;
4. ob_start();
5. ob_end_clean();
6. $output = preg_match_all(‘/<img .+src="['"]([




Leave a Reply