Results 1 to 4 of 4

Thread: I want to cancel the silider

  1. #1
    Thread Starter
    Expired Customer bidakkabi's Avatar
    Join Date
    Mar 2018
    Posts
    99
    Thanks
    10
    Thanked 1 Time in 1 Post

    I want to cancel the silider

    Hello, how should I edit the file?
    I want to cancel the slider and make it appear as a grid.
    Can anyone edit this for me?

    HTML Code:
    <?php
    /**
     * Featured listings widget class.
     *
     * @package ClassiPress\Widgets
     * @author AppThemes
     * @since 4.0.0
     */
    
    /**
     * Featured listings widget class.
     *
     * @since 4.0.0
     */
    class CP_Widget_Listing_Featured_Slider extends CP_Widget_Listing_Latest {
    
    	/**
    	 * Constructor
    	 *
    	 * @param array $args Predefined widget arguments.
    	 */
    	public function __construct( $args = array() ) {
    		$default_args = array(
    			'id_base'         => 'cp_widget_listing_featured',
    			'name'            => __( 'ClassiPress - Home Featured Listings', APP_TD ),
    			'defaults'        => array(
    				'header'         => __( 'Featured Listings', APP_TD ),
    				'layout'         => 'hero',
    				'limit'          => 6,
    				'show_button'    => true,
    				'show_more'      => false,
    				'show_desc'      => true,
    				'show_number'    => 1,
    				'scroll_number'  => 1,
    				'fade'           => true,
    				'autoplay'       => false,
    				'autoplay_speed' => 3000,
    				'speed'          => 800,
    				'height'         => 10,
    				'post__in'       => '',
    				'category__in'   => '',
    				'description'    => __( 'Check out our featured listings', APP_TD ),
    			),
    			'widget_ops'      => array(
    				'description' => __( 'Display your featured listings.', APP_TD ),
    			),
    			'control_options' => array(),
    		);
    
    		$args = $this->_array_merge_recursive( $default_args, $args );
    
    		parent::__construct( $args );
    	}
    
    	/**
    	 * Retrieves form fields in scbForm format.
    	 *
    	 * @return array Form fields array.
    	 */
    	protected function form_fields() {
    		return array(
    			array(
    				'type' => 'text',
    				'name' => 'header',
    				'desc' => __( 'Title:', APP_TD ),
    			),
    			array(
    				'type' => 'text',
    				'name' => 'description',
    				'desc' => __( 'Description:', APP_TD ),
    			),
    			array(
    				'type' => 'select',
    				'name' => 'layout',
    				'desc' => __( 'Layout type:', APP_TD ),
    				'choices' => array( 'here' => __( 'Hero', APP_TD ), 'card' => __( 'Card', APP_TD ) ),
    			),
    			array(
    				'type' => 'number',
    				'name' => 'height',
    				'desc' => __( 'Thumbnail height (em):', APP_TD ),
    				'extra' => array(
    					'max'  => 10,
    					'min'  => 0,
    				),
    			),
    			array(
    				'type' => 'checkbox',
    				'name' => 'show_button',
    				'desc' => __( 'Show View Ad button', APP_TD ),
    			),
    			array(
    				'type' => 'checkbox',
    				'name' => 'show_more',
    				'desc' => __( 'Show View More button', APP_TD ),
    			),
    			array(
    				'type' => 'checkbox',
    				'name' => 'show_desc',
    				'desc' => __( 'Show Ad description', APP_TD ),
    			),
    			array(
    				'type'  => 'number',
    				'name'  => 'show_number',
    				'desc'  => __( 'Number to show:', APP_TD ),
    				'extra' => array(
    					'class' => 'widefat',
    					'min'   => 1,
    					'step'  => 1,
    				),
    			),
    			array(
    				'type'  => 'number',
    				'name'  => 'scroll_number',
    				'desc'  => __( 'Number to scroll:', APP_TD ),
    				'extra' => array(
    					'class' => 'widefat',
    					'min'   => 1,
    					'step'  => 1,
    				),
    			),
    			array(
    				'type'  => 'number',
    				'name'  => 'limit',
    				'desc'  => __( 'Total number of slides:', APP_TD ),
    				'extra' => array(
    					'class' => 'widefat',
    					'min'   => 1,
    					'step'  => 1,
    				),
    			),
    			array(
    				'type' => 'checkbox',
    				'name' => 'fade',
    				'desc' => __( 'Fade slides', APP_TD ),
    			),
    			array(
    				'type' => 'checkbox',
    				'name' => 'autoplay',
    				'desc' => __( 'Autoplay', APP_TD ),
    			),
    			array(
    				'type' => 'number',
    				'name' => 'autoplay_speed',
    				'desc' => __( 'Autoplay Speed in milliseconds:', APP_TD ),
    			),
    			array(
    				'type' => 'number',
    				'name' => 'speed',
    				'desc' => __( 'Slide/Fade animation speed:', APP_TD ),
    			),
    			array(
    				'type' => 'text',
    				'name' => 'post__in',
    				'desc' => __( 'Filter posts by IDs.', APP_TD ) . " " . __( 'Enter posts IDs delimited by comma:', APP_TD ),
    			),
    			array(
    				'type' => 'text',
    				'name' => 'category__in',
    				'desc' => __( 'Filter posts by category.', APP_TD ) . " " . __( 'Enter categories IDs delimited by comma:', APP_TD ),
    			),
    		);
    	}
    
    	/**
    	 * Retrieves a query arg array to get specific list of items.
    	 *
    	 * Query featured listings in random order.
    	 *
    	 * @param array $instance The settings for the particular instance of the
    	 *                         widget.
    	 *
    	 * @return array Query args array.
    	 */
    	protected function get_query_args( $instance ) {
    
    		$instance = array_merge( $this->defaults, (array) $instance );
    
    		$args = apply_filters( 'cp_featured_slider_args', array(
    			'post_type'        => APP_POST_TYPE,
    			'post_status'      => 'publish',
    			'post__in'         => get_option( 'sticky_posts' ),
    			'posts_per_page'   => absint( $instance['limit'] ),
    			'orderby'          => 'rand',
    			'no_found_rows'    => true,
    			'suppress_filters' => false,
    		) );
    
    		$post__in = array_map( 'trim', explode( ',', $instance['post__in'] ) );
    
    		if ( ! empty( $post__in[0] ) ) {
    			$args['post__in'] = $post__in;
    		}
    
    		$category__in = array_map( 'trim', explode( ',', $instance['category__in'] ) );
    
    		if ( ! empty( $category__in[0] ) ) {
    			$args['tax_query'] = array(
    				array(
    					'taxonomy' => APP_TAX_CAT,
    					'field'    => 'id',
    					'terms'    => $category__in,
    				),
    			);
    		}
    
    		return $args;
    	}
    
    	/**
    	 * This is where the actual widget content goes.
    	 *
    	 * @param array $instance The settings for the particular instance of the
    	 * widget.
    	 */
    	public function content( $instance ) {
    		global $wp_query;
    
    		$instance = array_merge( $this->defaults, (array) $instance );
    
    		// Safely set query var.
    		$wp_query->set( 'instance', $instance );
    		appthemes_get_template_part( 'featured', APP_POST_TYPE );
    	}
    }

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,985
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Expired Customer bidakkabi's Avatar
    Join Date
    Mar 2018
    Posts
    99
    Thanks
    10
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,985
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. To cancel this request
    By paule in forum ClassiPress General Discussion
    Replies: 0
    Last Post: May 29th, 2015, 09:47 AM
  2. Dimitris Can't cancel Project
    By alexaung in forum Report HireBee Bugs
    Replies: 1
    Last Post: August 18th, 2014, 06:12 AM
  3. Samcy cancel all charges
    By babatunde in forum Help Using HireBee
    Replies: 1
    Last Post: July 15th, 2014, 05:24 PM
  4. [SOLVED] Cancel reccurring bug
    By socksrule in forum Report Vantage Bugs (Legacy)
    Replies: 15
    Last Post: January 10th, 2014, 07:43 AM