'post', 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, ); $pinned_posts_content_from = blogmarks_get_option('pinned_posts_content_from', 'category'); if ('category' == $pinned_posts_content_from) : $pinned_posts_cat = blogmarks_get_option('pinned_posts_cat'); $pinned_posts_orderby = esc_attr(blogmarks_get_option('pinned_posts_orderby', 'date')); $pinned_post_args['posts_per_page'] = $pinned_number_of_posts; $pinned_post_args['orderby'] = ('id' == $pinned_posts_orderby) ? strtoupper($pinned_posts_orderby) : $pinned_posts_orderby; $pinned_post_args['order'] = esc_attr(blogmarks_get_option('pinned_posts_order', 'desc')); if (!empty($pinned_posts_cat)) : $pinned_post_args['tax_query'][] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => absint($pinned_posts_cat), ); endif; else : $pinned_posts_ids = blogmarks_get_option('pinned_posts_ids'); if (!empty($pinned_posts_ids)) : $post_ids = explode(',', esc_attr($pinned_posts_ids)); $pinned_post_args['post__in'] = $post_ids; $pinned_post_args['orderby'] = 'post__in'; $pinned_post_args['posts_per_page'] = $pinned_number_of_posts; endif; endif; $pinned_post = new WP_Query($pinned_post_args); if ($pinned_post->have_posts()) : $show_pinned_posts_category = blogmarks_get_option('show_pinned_posts_category', true); if ($show_pinned_posts_category) { $pinned_posts_cat_style = blogmarks_get_option('pinned_posts_category_style', 'style_2'); $pinned_posts_cat_color = blogmarks_get_option('pinned_posts_category_color_display', 'as_bg'); $pinned_posts_cat_limit = blogmarks_get_option('pinned_posts_category_limit', 1); } $enable_pinned_posts_overlay = blogmarks_get_option('enable_pinned_posts_overlay', true); if ($enable_pinned_posts_overlay) { $pinned_posts_overlay_style = 'background-color:' . esc_attr(blogmarks_get_option('pinned_posts_overlay_color', '#000000')) . ';'; $pinned_posts_overlay_style .= 'opacity:' . esc_attr(blogmarks_get_option('pinned_posts_overlay_opacity', 0.6)) . ';'; } $pinned_post_meta = blogmarks_get_option('pinned_post_meta'); $pinned_post_meta_settings = array( 'date_format' => blogmarks_get_option('pinned_posts_date_format', 'format_2'), 'author_image' => blogmarks_get_option('enable_pinned_posts_author_image'), 'show_icons' => blogmarks_get_option('show_pinned_post_meta_icon', true), ); ?>

have_posts()) : $pinned_post->the_post(); if (has_post_thumbnail()) : ?>