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

How to Find a Gallery’s ID

The shortcode supports specifying the gallery’s id by supplying the id parameter. More on this in the documentation. However, using id might be contra productive if you wish to use two different styles of galleries across your site, in which case you would need to use the same style for a whole lot of #ids … 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

Custom rewrite rules for /pastissues/%category%-%postname%.html

Or, you can do that – after headhache and spent one day to find a solution : You have to set ‘rewrite’ => false in your register_post_type(); and add after closing register_post_type() : // 404 CPT permalink WP bug… global $wp_rewrite; $projet_structure=”/projets/%projet%”; $wp_rewrite->add_rewrite_tag(“%projet%”, ‘([^/]+)’, “projet=”); $wp_rewrite->add_permastruct(‘projet’, $projet_structure, false); Where projet is my CPT See here … Read more

How to edit wp-signup.php content using plugin

you can try these hooks: // // remove label label[for=signupuser] and #signupuser on wp-signup.php with CSS // add_action(‘signup_header’,’my_signup’); function my_signup() { echo “<style>label[for=signupuser],#signupuser{display:none !important;}</style>”; } // // edit text displayed on wp-signup.php // add_filter( ‘gettext’, ‘my_change_text’, 20 ,3); function my_change_text( $translated_text, $text, $domain ) { if ( $domain ==”your_site_name”) { // EDIT if( trim($translated_text)==”Get your … Read more

Plugin’s total number of users

I do not think that this is possible. This numbers are only calculated by which Version has been downloaded (+1 to the absolute Download statistics) and if an Update changed the Version (-1 to the former and +1 to the current, used for the percentage). I am not really sure about the second part, but … Read more