Title: Ajith K Ranatunga's Replies | WordPress.org

---

# Ajith K Ranatunga

  [  ](https://wordpress.org/support/users/ajith2011/)

 *   [Profile](https://wordpress.org/support/users/ajith2011/)
 *   [Topics Started](https://wordpress.org/support/users/ajith2011/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ajith2011/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ajith2011/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ajith2011/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ajith2011/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ajith2011/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Open Table Widget] "Time" dropdown issue](https://wordpress.org/support/topic/time-dropdown-issue/)
 *  Thread Starter [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/time-dropdown-issue/#post-7066246)
 * Finally I found it is only available for paid version. So purchased it!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Multiple values to same meta key](https://wordpress.org/support/topic/multiple-values-to-same-meta-key/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-values-to-same-meta-key/#post-6852932)
 * you can do this by serializing all the values and store in a single meta key,
   OR you can dynamically generate multiple meta keys and store as usual.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Zerif Lite] How do I disable site load animation](https://wordpress.org/support/topic/how-do-i-disable-site-load-animation/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/how-do-i-disable-site-load-animation/#post-6860660)
 * glad that you could fixed your problem
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [can install plugins, add images , insert articles but not uploads](https://wordpress.org/support/topic/can-install-plugins-add-images-insert-articles-but-not-uploads/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/can-install-plugins-add-images-insert-articles-but-not-uploads/#post-6860657)
 * don’t you get a directory name? if you get any name, create the directory with
   that name manually and try to install it.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Zerif Lite] How do I disable site load animation](https://wordpress.org/support/topic/how-do-i-disable-site-load-animation/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/how-do-i-disable-site-load-animation/#post-6860650)
 * Hi wiroxit,
 * you are welcome.
 * zerif-lite developers says there is an option ( checkbox ) to prevent loading
   pre-load image in theme options. But if you can’t find it, just open style.css
   in your theme folder and remove the code bellow. You should find this code around
   line number 1280
 *     ```
       .preloader {
       position: fixed;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       background-color: #fefefe;
       z-index: 99999;
       height: 100%;
       width: 100%;
       overflow: hidden !important;
       }
       .status {
       width: 200px;
       height: 200px;
       position: absolute;
       left: 50%;
       top: 50%;
       background-image: url(images/loading.gif);
       background-repeat: no-repeat;
       background-position: center;
       margin: -100px 0 0 -100px;
       }
       ```
   
 * Hope this helps you out.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Show category posts](https://wordpress.org/support/topic/show-category-posts-1/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/show-category-posts-1/#post-6860645)
 * if you want to show posts in a category on a page, you can follow the instructions
   bellow.
 * 1. copy and past bellow code in the functions.php file in your theme.
 *     ```
       <?php
       function unc_show_posts_by_category($attr){
           /** wp query to get posts from specific category */
           $cat_name = $attr['category_name'];
           $num_posts = $attr['num_posts'];
           $unc_query = new WP_Query( array('category_name' => $cat_name, 'posts_per_page' => $num_posts));
   
           $results = '';
           /** starting the loop */
           if($unc_query->have_posts()):
               $results .= '<ul class="muaw-posts-by-category">';
               while($unc_query->have_posts()){
                   $unc_query->the_post();
                   $results .= '<li>';
                   if(has_post_thumbnail()) {
                       $results .= '<a href="' . get_the_permalink() . '" rel="bookmark">' . get_the_post_thumbnail(get_the_ID(), array(50, 50)) . get_the_title() . '</a>';
                   } else {
                       $results .= '<a href="' . get_the_permalink() . '" rel="bookmark">' .get_the_title() . '</a>';
                       $results .= get_the_excerpt();
                   }
                   $results .= '</li>';
               }
               $results .= '</ul>';
           endif;
   
           return $results;
   
           /* Re-set original Post Data */
           wp_reset_postdata();
       }
   
       // Add a shortcode
       add_shortcode('muaw_category_posts', 'unc_show_posts_by_category');
       ?>
       ```
   
 * 2. Add bellow shortcode with category name and number of posts.
    `[muaw_category_posts
   category_name="uncategorized" num_posts="5"]`
 * That’s it. This code is used for one of my theme, so feel free to make necessary
   adjustments.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Zerif Lite] How do I disable site load animation](https://wordpress.org/support/topic/how-do-i-disable-site-load-animation/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/how-do-i-disable-site-load-animation/#post-6860634)
 * Usually loading image is used to show it until the site is loaded. I don’t think
   that you can load the site even you remove the loading animation. But I can take
   a look if you could post the URL of your site.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [can install plugins, add images , insert articles but not uploads](https://wordpress.org/support/topic/can-install-plugins-add-images-insert-articles-but-not-uploads/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/can-install-plugins-add-images-insert-articles-but-not-uploads/#post-6860633)
 * This should be a file permission issue. Did you not check file permissions and
   try to fix any related issues ?
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Category Thumbnails] No option showing to add/select thumbnail.](https://wordpress.org/support/topic/no-option-showing-to-addselect-thumbnail/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/no-option-showing-to-addselect-thumbnail/#post-7789286)
 * Thank you very much for this comment and plugin is great, thanks to plugin author
   too.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Updating posts with $wpdb->update() and wp_update_post()](https://wordpress.org/support/topic/updating-posts-with-wpdb-update-and-wp_update_post/)
 *  [Ajith K Ranatunga](https://wordpress.org/support/users/ajith2011/)
 * (@ajith2011)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/updating-posts-with-wpdb-update-and-wp_update_post/#post-3626542)
 * I also having the similar problem. When I try to change post status from “publish”
   to “draft” it duplicates the post and the new one is a “draft”. I need to change
   the status of the existing post instead.
 * Please advice me where I have been wrong or is there anyway I can do that.
 * Here I’m pasting the code I’ve used.
 *     ```
       $my_post = array();
       $my_post['ID'] = $id;
       $my_post['post_status'] = 'draft';
       wp_update_post($my_post);
       ```
   
 * _[Please post code & markup between backticks or use the code button. Your posted
   code may now have been permanently damaged by the forum’s parser.]_
 * I have been spending hours on google to find a solution for this. Please help
   me if any one know this.

Viewing 10 replies - 1 through 10 (of 10 total)