0

I am converting an html template to a WordPress theme. In the WordPress theme development process I'm stuck at dynamic logo carousel. Can anyone tell me how to create a logo carousel dynamically without using a plugin? Maybe by using any method like featured post, an image carousel, etc.

client logo carousel

1 Answer 1

0

You can create a custom post type for the logos as shown below,

function create_post_type() {

 register_post_type( 'logo',
   array(
     'labels' => array(
        'name' => __( 'Logos' ),
        'singular_name' => __( 'Logo' ),
        'add_new' => __( 'Add New' ),
        'add_new_item' => __( 'Add New Logo' ),
        'featured_image' => __( 'Add Image' ),
        'edit_item' => __( 'Edit Logo' )
     ),
   'public' => true,
   'menu_icon' => 'dashicons-images-alt2',
   'has_archive' => true,
   'rewrite' => array('slug' => 'logo'),
   'supports' => array('title','thumbnail'),
  )
 );
}
add_action( 'init', 'create_post_type' );

Add the above code in your theme's functions.php file.

Then you replace your static logos with post loop.

1
  • Glad that it helped you !! Nov 22, 2018 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.