• Hello all
    I need to help (((
    I hive widget

    This is widget code:

    class Noo_Job_Category_Widget extends Noo_Wiget {
    	public function __construct() {
    		$this->widget_cssclass = 'noo-job-category-widget';
    		$this->widget_description = __( "Display Noo Job Categories.", 'noo' );
    		$this->widget_id = 'noo_job_category_widget';
    		$this->widget_name = __( 'Noo Job Categories', 'noo' );
    		$this->cached = true;
    		$this->settings = array(
    			'title' => array( 'type' => 'text', 'std' => '', 'label' => __( 'Title', 'noo' ) ),
    			'count' => array(
    				'type'  => 'checkbox',
    				'std'   => 0,
    				'label' => __( 'Show Job Counts', 'noo' )
    			),
    			'include_empty' => array(
    				'type'  => 'checkbox',
    				'std'   => 0,
    				'label' => __( 'Include Empty Categories', 'noo' )
    			),
    			'hierarchical' => array(
    				'type'  => 'checkbox',
    				'std'   => 0,
    				'label' => __( 'Show Hierarchy', 'noo' )
    			),
    		);
    		parent::__construct();
    	}

    It looks so: http://rghost.ru/6CHQwJYR8/image.png

    And to do like this: http://rghost.ru/8q8wl8KTG/image.png

    Please help(((

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter okeeyz

    (@okeeyz)

    please giv me you skype

    Thread Starter okeeyz

    (@okeeyz)

    public function widget( $args, $instance ) {
    		extract( $args );
    		$title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    		$c = ! empty( $instance['count'] ) ? '1' : '0';
    		$h = ! empty( $instance['hierarchical'] ) ? '1' : '0';
    		$e = ! empty( $instance['include_empty'] ) ? '0' : '1';
    		$cat_args = array(
    			'taxonomy'     =>'job_category',
    			'orderby'      => 'name',
    			'show_count'   => $c,
    			'hide_empty'   => $e,
    			'hierarchical' => $h
    		);
    		echo $args['before_widget'];
    		if ( $title ) {
    			echo $args['before_title'] . $title . $args['after_title'];
    		}
    
    		$categories = get_categories( $cat_args );
    		echo '<ul>';
    		echo  walk_category_tree( $categories, 0, array(
    			'style'              =>'list',
    			'show_count'         =>$c,
    			'hide_empty'         => $e,
    			'hierarchical'       =>$h,
    			'use_desc_for_title' =>1,
    		));
    		echo '</ul>';
    		echo $args['after_widget'];
    	}
    }
    
    class Noo_Job_Location_Widget extends Noo_Wiget {
    	public function __construct() {
    		$this->widget_cssclass = 'noo-job-location-widget';
    		$this->widget_description = __( "Display Noo Job Location.", 'noo' );
    		$this->widget_id = 'noo_job_location_widget';
    		$this->widget_name = __( 'Noo Job Location', 'noo' );
    		$this->cached = true;
    		$this->settings = array(
    			'title' => array( 'type' => 'text', 'std' => '', 'label' => __( 'Title', 'noo' ) ),
    			'display' => array( 'type' => 'text', 'std' =>5, 'label' => __( 'Display', 'noo' ) ),
    			'count' => array(
    				'type'  => 'checkbox',
    				'std'   => 0,
    				'label' => __( 'Show post counts', 'noo' )
    			),
    			'include_empty' => array(
    				'type'  => 'checkbox',
    				'std'   => 0,
    				'label' => __( 'Include Empty Categories', 'noo' )
    			),
    			'hierarchical' => array(
    				'type'  => 'checkbox',
    				'std'   => 0,
    				'label' => __( 'Show hierarchy', 'noo' )
    			),
    		);
    		parent::__construct();
    	}
    Thread Starter okeeyz

    (@okeeyz)

    *(((((((((((((((((((((

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @okeeyz, Please don’t try to contact people off the forums.

    Taking a step back for a moment, can you calmly describe the issue you are facing? I mean through text and not code or screenshots.

    Thread Starter okeeyz

    (@okeeyz)

    i can not speack english
    and russian people very angry…

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Ok, it looks like someone is already helping you in your native language at https://ru.forums.wordpress.org/topic/Как-изменить-виджеты

    I recommend waiting for them to reply.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to change widgets?’ is closed to new replies.