Remove last comma from this query

Looks like you’re trying to build up some JSON. Why not use what PHP already provides, which has the advantage of escaping characters too? global $post; $data = array(); if ($loop->have_posts()) { while ($loop->have_posts()) { $loop->the_post(); $thumb=wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’); $thumb2=wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘medium’); $url = rwmb_meta( ‘smb_katalozi’ ); $data[] = array ( ‘image’ => … Read more

Exclude sticky posts from query

You should also use ignore_sticky_posts=1 (it’s default value is 0, so sticky posts aren’t ignored and returned at top of posts list). More on pagination parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

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