Title: speedwheel's Replies | WordPress.org

---

# speedwheel

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Admin panel custom post pagination showing same results](https://wordpress.org/support/topic/admin-panel-custom-post-pagination-showing-same-results/)
 *  Thread Starter [speedwheel](https://wordpress.org/support/users/speedwheel/)
 * (@speedwheel)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/admin-panel-custom-post-pagination-showing-same-results/#post-11259374)
 * [@lucagrandicelli](https://wordpress.org/support/users/lucagrandicelli/) Thanks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Admin panel custom post pagination showing same results](https://wordpress.org/support/topic/admin-panel-custom-post-pagination-showing-same-results/)
 *  Thread Starter [speedwheel](https://wordpress.org/support/users/speedwheel/)
 * (@speedwheel)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/admin-panel-custom-post-pagination-showing-same-results/#post-11259332)
 * [@lucagrandicelli](https://wordpress.org/support/users/lucagrandicelli/) here
   is the code:
 *     ```
       Class CP_Testimonial {
       	/**
       	 * Initialize all the things
       	 */
   
           public static $post_name = 'testimonial';
           public static $tag_taxonomy = 'testimonial_tag';
   
       	function __construct() {
       		// Actions
               add_action( 'init', array( $this, 'register_cpt' ) );
               add_action( 'after_setup_theme', array( $this, 'register_ct_tags' ), 1 );
       	}
       	/**
       	 * Register the custom post type
       	 */
       	public function register_cpt() {
       		$labels = array(
                   'all_items'          => __( 'All Testimonials', 'ediloc' ),
       			'name'               => __( 'Testimonials', 'ediloc' ),
       			'singular_name'      => __( 'Testimonial', 'ediloc' ),
       			'add_new'            => __( 'Add New', 'ediloc' ),
       			'add_new_item'       => __( 'Add New Testimonial', 'ediloc' ),
                   'edit_item'          => __( 'Edit Testimonial', 'ediloc' ),
                   'update_item'        => __( 'Update Testimonial', 'ediloc' ),
       			'new_item'           => __( 'New Testimonial', 'ediloc' ),
       			'view_item'          => __( 'View Testimonial', 'ediloc' ),
       			'search_items'       => __( 'Search Testimonials', 'ediloc' ),
       			'not_found'          => __( 'No Testimonials found', 'ediloc' ),
       			'not_found_in_trash' => __( 'No Testimonials found in Trash', 'ediloc' ),
       			'parent_item_colon'  => __( 'Parent Testimonial:', 'ediloc' ),
       			'menu_name'          => __( 'Testimonials', 'ediloc' ),
       		);
       		$args = array(
                   'labels'              => $labels,
                   'description'         => __( 'Testimonials for the website.', 'ediloc' ),
       			'hierarchical'        => false,
       			'supports'            => array( 'title', 'editor', 'thumbnail', 'revisions' ),
       			'public'              => false,
       			'show_ui'             => true,
       			'show_in_rest'        => true,
       			'publicly_queryable'  => false,
       			'exclude_from_search' => true,
                   'has_archive'         => false,
                   'show_in_menu'        => true,
       		    'show_in_nav_menus'   => true,
       			'query_var'           => true,
                   'can_export'          => true,
                   'show_in_admin_bar'   => true,
                   //'rewrite'             => array( 'slug' => 'testimonial', 'with_front' => false ),
                   'menu_position'       => 20,
       			'menu_icon'           => 'dashicons-format-quote',
       			//'template'            => array( array( 'core/quote', array( 'className' => 'is-style-large' ) ) ),
       			//'template_lock'      => 'all',
       		);
       		register_post_type( self::$post_name , $args );
           }
   
           //category type taxonomy tags
           public function register_ct_tags() {
               $labels = array(
                   'name' => __( 'Tags', 'ediloc' ),
                   'singular_name' => __( 'Tag', 'ediloc' ),
                   'search_items' =>  __( 'Search Tag', 'ediloc' ),
                   'all_items' => __( 'All Tags', 'ediloc' ),
                   'parent_item' => __( 'Parent Tag', 'ediloc' ),
                   'parent_item_colon' => __( 'Parent Tag:', 'ediloc' ),
                   'edit_item' => __( 'Edit Tag', 'ediloc' ), 
                   'update_item' => __( 'Update Tag', 'ediloc' ),
                   'add_new_item' => __( 'Add New Tag', 'ediloc' ),
                   'new_item_name' => __( 'New Tag Name', 'ediloc' ),
                   'menu_name' => __( 'Tags', 'ediloc' ),
               ); 	
   
               register_taxonomy(self::$tag_taxonomy, array(self::$post_name), array(
                   'public' => true,   
                   'hierarchical' => false,
                   'labels' => $labels,
                   'show_ui' => true,
                   'show_admin_column' => true,
                   'show_in_nav_menus' => false,
                   'query_var' => true,
                   'show_in_rest' => true,
                   'rewrite' => array( 'slug' => self::$tag_taxonomy ),
               ));
           }
   
           public static function get_random($limit, $term_ids) {
               $args = array(
                   'post_type' => self::$post_name,
                   'tax_query' => array( 
                       array( 
                           'taxonomy' => self::$tag_taxonomy,
                           'field' => 'id', 
                           'terms' => $term_ids
                       ) 
                   ),
                   'orderby'   => 'rand',
                   'posts_per_page' => $limit,
                );
               $testimonials = new WP_Query( $args );
               return $testimonials;
           }
   
           public static function get_tags() {
               $tags = [];
               $terms = get_terms( [
                   'taxonomy' => self::$tag_taxonomy,
                   'hide_empty' => true,
               ]);
               if (!empty($terms)) {
                   foreach($terms as $term) {
                       $tags[$term->term_id] = $term->name;
                   }
               }
               return $tags;
           }
       }
       new CP_Testimonial();
       ```
   
    -  This reply was modified 7 years, 5 months ago by [speedwheel](https://wordpress.org/support/users/speedwheel/).
    -  This reply was modified 7 years, 5 months ago by [speedwheel](https://wordpress.org/support/users/speedwheel/).
    -  This reply was modified 7 years, 5 months ago by [speedwheel](https://wordpress.org/support/users/speedwheel/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Admin panel custom post pagination showing same results](https://wordpress.org/support/topic/admin-panel-custom-post-pagination-showing-same-results/)
 *  Thread Starter [speedwheel](https://wordpress.org/support/users/speedwheel/)
 * (@speedwheel)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/admin-panel-custom-post-pagination-showing-same-results/#post-11259321)
 * I think I found the issue, I used WP All Import to import these 28 posts, and
   in the database they all have the same date (including seconds), so wordpress
   can’t order them by date using pagination (since they all have the same date).
   When I order them by title it works fine.
    -  This reply was modified 7 years, 5 months ago by [speedwheel](https://wordpress.org/support/users/speedwheel/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery] Slider with thumbnails under instead of lightbox](https://wordpress.org/support/topic/slider-with-thumbnails-under-instead-of-lightbox/)
 *  Thread Starter [speedwheel](https://wordpress.org/support/users/speedwheel/)
 * (@speedwheel)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/slider-with-thumbnails-under-instead-of-lightbox/#post-5464859)
 * [http://www.smarttechno.eu/sample-page/](http://www.smarttechno.eu/sample-page/)
 * It’s still the same, I have new wordpress installation and new plugin installation(
   latest version).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery] Slider with thumbnails under instead of lightbox](https://wordpress.org/support/topic/slider-with-thumbnails-under-instead-of-lightbox/)
 *  Thread Starter [speedwheel](https://wordpress.org/support/users/speedwheel/)
 * (@speedwheel)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/slider-with-thumbnails-under-instead-of-lightbox/#post-5464847)
 * I put it here for test:
 * [http://www.smarttechno.eu/?page_id=2](http://www.smarttechno.eu/?page_id=2)
 * When I click on any of the 2 images it’s not showing the slider with thumbnails
   and arrows like it did in the begining.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Using ajax to load wordpress dropmenu (megamenu)](https://wordpress.org/support/topic/using-ajax-to-load-wordpress-dropmenu-megamenu/)
 *  Thread Starter [speedwheel](https://wordpress.org/support/users/speedwheel/)
 * (@speedwheel)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/using-ajax-to-load-wordpress-dropmenu-megamenu/#post-4432958)
 * There are only 2 levels menu, the main menu and the drop down.
 * Can you give some hints how to make the ajax call so I can investigate? I’m new
   in ajax world.

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