WordPress: embedding last posted video

This should work, even outside of the loop: $latestPost = get_posts(‘numberposts=1&category=YOUR_CATEGORY_ID’); The WordPress function get_posts sorts by post date, newest-to-oldest by default, so you’d get the newest post in whatever category you choose. Also, even though you are only requesting one post, the response will still be an array: echo $latestPost[0]->post_content; Edit: Since the video … Read more

WordPress Comment functions

I do hope I understand what you’re asking, as you’re not giving much information. From what I specifically to customize the output of your comments. Well, there partially is. The wp_list_comments accepts a callback argument among several others. This callback allows you to run a custom function; in your case, a custom function to manipulate … Read more

Changing functions.php and .htaccess files

functions.php file is where you can do wonders with your theme without touching the core WordPress files. Most of the time the backup functions.php trick would work for you unless you aren’t changing anything in the database with any of your action or filter hooks. You could check this link too -> http://codex.wordpress.org/Theme_Development#Functions_File Regarding the … Read more

Show one of the taxonomies always as default

$tax_slug = ‘departments’; $tax_term = ‘first-department’; // get taxonomy by slug and term $tax_args = array( $tax_slug => $tax_term ); // merge your args, with the tax args $args = array_merge( $args, $tax_args ); // Get term object $term_title = get_term_by( $tax_term, ”, $tax_slug ); // Display Title/Headline echo “<h2>{$term_title->name}</h2>”;

image background is cut [closed]

Your background image repeats all right – but there’s a white bar at the bottom of your image… http://dev.freelanceu.net/mjl/miamischool/wp-content/uploads/2011/12/MCCS_bg.jpg

Echo custom field value in shortcode function

Try this code, I’ve removed query_posts and used get_posts instead because I’m not sure if query_posts will work in a shortcode and using get_posts is safer. function featured() { $posts = get_posts(array(‘post_type’ => ‘property’, ‘posts_per_page’ => 2)); if(isset($posts) && !empty($posts)) { foreach($posts as $post) { echo “<div class=\”singlefeatured group\”>”; //I wasn’t sure what you wanted … Read more