Recent posts per category loop?

here is a quick one: (edit: I updated some forgotten punctuation). <?php /* Plugin Name: Recent posts per category loop Plugin URI: http://en.bainternet.info Description: answer to http://wordpress.stackexchange.com/questions/16616/recent-posts-per-category-loop Author: Bainternet Version: 1.0 Author URI: http://en.bainternet.info */ // Initialization function function WP_Widget_display_widget_init() { new WP_Widget_display_widget(); } // Your Class class WP_Widget_display_widget extends WP_Widget { // Constructor function … Read more

Add filter to the end of the post

2 options: 1) Edit your youtube_video() function so it return a string instead of printing the code 2) The easiest way… if you can edit your theme, place the youtube_video() call after showing your post content Edit: <?php function youtube_video() { $ret = “”; $ret .= “<div class=”post”>”; $newvar = urlencode(get_the_title()); include_once(ABSPATH . WPINC . … Read more

Posts vs Pages and categories

the way WordPress stores pages in the database is the same as it stores posts, so it makes no difference if the content is created as pages or posts (static or not). And if most of the content is static you can always use a caching plugin to serve that content as static.

Thumbnail Image to go in the post aswell

Use the post thumbnail for the single blog pages too. You can use the add_image_size() function to create an additional image size that is displayed on the blog posts. add_image_size(‘single-post-image’, 650, 250, true); // name, width, height, crop mode Then in single.php the_post_thumbnail(‘image-size’); Simply place the first function in your functions.php, and the second in … Read more

query_post order desc

You need to use this to parameters orderby and order <?php query_posts( array( ‘category_name’ => ‘my_category_slug’, ‘orderby’ => ‘ID’, ‘order’ => ‘DESC’, ‘posts_per_page’ => -1 ) ); ?>