How do I implement an image viewer and rotator? [closed]

There are a ton of slider plugins. Some are just jQuery plugins that would require you to create your own code for, but off the top of my head I know that Nivo and Woo both make fully-integrated slider plugins where you can control the control from within WordPress. Both release their jQuery plugin script, … Read more

limit number of images shown from gallery

Try this: $args = array( ‘name’=>’header-images’, ‘posts_per_page’ => 4, ‘orderby’ => ‘rand’ ); i.e. use posts_per_page instead of numberposts if you want to use query_posts() according to the the Codex page: http://codex.wordpress.org/Function_Reference/query_posts Edit: Here is one idea – fetch the gallery shortcode ids from a page content with a given slug: /* * Get an … Read more

Featured Image keeps cropping

add_action( ‘wp_enqueue_scripts’, ‘brian_scripts’ ); if ( function_exists( ‘add_theme_support’ ) ) { add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size( 214, 9999, false ); add_image_size(‘large’, 500, 9999, true); //custom size } This code is in your functions.php? The docs for add_theme_support() suggest to only use it in the functions.php of the theme or attach it to the after_setup_theme hook. Also … Read more

Link post images to post

Yes, don’t use regex for parsing HTML but use DOM instead. This is how I would work it out : In your toolbox, a function to get innerDOM of a node : // GET INNER HTML OF A NODE function DOMinnerHTML($element) { $innerHTML = “”; $children = $element->childNodes; foreach ($children as $child) { $tmp_dom = … Read more

Fetch the latest post with attachment image

This is a tricky one. If you wanted to get the latest image attachment and display the post associated with it, you could use: $attachments = get_posts(‘post_type=attachment’); $first_attachment_post = get_post($attachments[0]->post_parent); To get the latest post, but only if it has an attachment, I think the only way to do it would be with two nested … Read more

How come the images arent loading properly?

The site’s Adress should be http://www.loftycsei.org/. You got a Problem in your timthumb.php, it is delivered with your Theme. It uses a deprecated Function on Line 549, ereg. The Problem is that when your image is processed, it outputs the deprecated warning before sending the Headerinformation for the Contents being a JPG. You got various … Read more

How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?

You should take a look at your Media Settings, to define the dimensions of your post thumbnails. Additionally, you could add this code to your functions.php to specify your own thumbnails and dimensions: // add thumbnail theme support add_action(‘after_setup_theme’,’tjnz_theme_support’); function tjnz_theme_support() { add_theme_support(‘post-thumbnails’); // wp thumbnails set_post_thumbnail_size(170, 170, true); // default thumb size add_theme_support(‘automatic-feed-links’); // … Read more