How to add testimonials with an image?

Make a new category called Testimonials then, in your theme folder add a new file called testimonials.php. Add this in the newly created file: <div id=”testimonials”> <?php $args = array(‘caller_get_posts’ => 1, ‘post_type’ => ‘testimonials’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 5); query_posts($args); if (have_posts()) : while (have_posts()) : the_post(); $image = get_post_meta($post->ID, ‘testimonial-image’, true); ?> … Read more

Getting posts by taxonomy

I usually use the tax_query parameter: $args = array( ‘post_type’ => ‘my_cpt_name’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘uom_system’, ‘field’ => ‘slug’, ‘terms’ => ‘metric-system’ ) ) ); $results = get_posts( $args ); See http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)