samedi 26 mars 2016

Adding a Category-wise post slider in wordpress theme

I installed wordpress Genesis theme for my website. Currently, the home page lists down all the recent posts together from different categories.

I want to remove showing all posts haphazardly and install a category wise post slider in my homepage where under each category segmented posts will be shown which the users can scroll horizontally.

I found out this plugin but don't know how to use it in my theme. It would be helpful if someone knows a similar plugin also.

Here is my genesis theme home.php file content

<?php

 /* I added this code for that plugin */
echo do_shortcode( '[wpsc_categorywise_slides]' );

//* Add Genesis grid loop
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'eleven40_grid_loop_helper' );
function eleven40_grid_loop_helper() {

    if ( function_exists( 'genesis_grid_loop' ) ) {
        genesis_grid_loop( array(
            'features'              => 0,
            'feature_image_size'    => 0,
            'feature_image_class'   => 'alignleft post-image',
            'feature_content_limit' => 0,
            'grid_image_size'       => 'grid-featured',
            'grid_image_class'      => 'grid-featured',
            'grid_content_limit'    => 250,
            'more'                  => __( '[Continue reading]', 'eleven40' ),
        ) );
    } else {
        genesis_standard_loop();
    }

}

//* Run the Genesis loop


genesis();



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire