How can i list random author?

The Codex lists rand as the orderby string, not RAND. I suspect that either works but I haven’t checked. But that isn’t how I’d do this. I’d lean toward something like… $current_category_ID = getCurrentCatID(); $current_cat_id = $current_category_ID; $author_array = array(); $args = array( ‘numberposts’ => -1, ‘cat’ => $current_cat_id ); $cat_posts = get_posts($args); foreach ($cat_posts … Read more

How can i listing current category and Featured Category post list?

I think you’re asking about your custom secondary loop affecting your main loop, correct? query_posts() alters the main loop. A quick fix would be to call wp_reset_query() after your custom loop to reset the query data: <?php wp_reset_query(); ?> However, it’s more efficient and friendlier to use WP_Query() instead of query_posts() (especially if you’re making … Read more

Accessing widget information

It seems that the index value goes incrementing and we add/remove instances of the widget. To make sure the correct data is grabbed, I can only think of checking inside the widget data itself through some control variable, something like: Array ( [2] => Array ( Accessing widget information => asian kung-fu generation Accessing widget … Read more

Plugin is creating posts twice

The code does not adds posts twice – checked in my local installation. You have got errors in it: $my_post = array( ‘post_title’ => $title, ‘post_date’ => $insDate, ‘post_content’ => ‘$url’, ‘post_status’ => ‘public’, ‘post_type’ => ‘post’, ); Should be $my_post = array( ‘post_title’ => $title, ‘post_date’ => $insDate, ‘post_content’ => $url, ‘post_status’ => ‘publish’, … Read more