Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • settings > options-reading.php ?

    Twobyte – hw is it going? I’d love to get the code too ๐Ÿ™‚

    just one question – how to move the filter dropdown above search button?

    Ok – posted in functions, and works. I had error before.
    thanks! ๐Ÿ™‚

    adding the filter to job-filters.php ends up with blank screen.
    salary in admin and frontent works good, but i can;t get the filter running.
    I have categories and tags.

    the whole job-filters.php:

    <?php wp_enqueue_script( 'wp-job-manager-ajax-filters' ); ?>
    
    <?php do_action( 'job_manager_job_filters_before', $atts ); ?>
    
    <form class="job_filters">
    	<?php do_action( 'job_manager_job_filters_start', $atts ); ?>
    
    	<div class="search_jobs">
    		<?php do_action( 'job_manager_job_filters_search_jobs_start', $atts ); ?>
    
    		<div class="search_keywords">
    			<label for="search_keywords"><?php _e( 'Keywords', 'wp-job-manager' ); ?></label>
    			<input type="text" name="search_keywords" id="search_keywords" placeholder="<?php esc_attr_e( 'Keywords', 'wp-job-manager' ); ?>" value="<?php echo esc_attr( $keywords ); ?>" />
    		</div>
    
    		<div class="search_location">
    			<label for="search_location"><?php _e( 'Location', 'wp-job-manager' ); ?></label>
    			<input type="text" name="search_location" id="search_location" placeholder="<?php esc_attr_e( 'Location', 'wp-job-manager' ); ?>" value="<?php echo esc_attr( $location ); ?>" />
    		</div>
    
    		<?php if ( $categories ) : ?>
    			<?php foreach ( $categories as $category ) : ?>
    				<input type="hidden" name="search_categories[]" value="<?php echo sanitize_title( $category ); ?>" />
    			<?php endforeach; ?>
    		<?php elseif ( $show_categories && ! is_tax( 'job_listing_category' ) && get_terms( 'job_listing_category' ) ) : ?>
    			<div class="search_categories">
    				<label for="search_categories"><?php _e( 'Category', 'wp-job-manager' ); ?></label>
    				<?php if ( $show_category_multiselect ) : ?>
    					<?php job_manager_dropdown_categories( array( 'taxonomy' => 'job_listing_category', 'hierarchical' => 1, 'name' => 'search_categories', 'orderby' => 'name', 'selected' => $selected_category, 'hide_empty' => false ) ); ?>
    				<?php else : ?>
    					<?php job_manager_dropdown_categories( array( 'taxonomy' => 'job_listing_category', 'hierarchical' => 1, 'show_option_all' => __( 'Any category', 'wp-job-manager' ), 'name' => 'search_categories', 'orderby' => 'name', 'selected' => $selected_category, 'multiple' => false ) ); ?>
    				<?php endif; ?>
    			</div>
    		<?php endif; ?>
    <?php
    /**
     * This can either be done with a filter (below) or the field can be added directly to the job-filters.php template file!
     *
     * job-manager-filter class handling was added in v1.23.6
     */
    add_action( 'job_manager_job_filters_search_jobs_end', 'filter_by_salary_field' );
    function filter_by_salary_field() {
    	?>
    	<div class="search_categories">
    		<label for="search_categories"><?php _e( 'Salary', 'wp-job-manager' ); ?></label>
    		<select name="filter_by_salary" class="job-manager-filter">
    			<option value=""><?php _e( 'Any Salary', 'wp-job-manager' ); ?></option>
    			<option value="upto20"><?php _e( 'Up to $20,000', 'wp-job-manager' ); ?></option>
    			<option value="20000-40000"><?php _e( '$20,000 to $40,000', 'wp-job-manager' ); ?></option>
    			<option value="40000-60000"><?php _e( '$40,000 to $60,000', 'wp-job-manager' ); ?></option>
    			<option value="over60"><?php _e( '$60,000+', 'wp-job-manager' ); ?></option>
    		</select>
    	</div>
    	<?php
    }
    /**
     * This code gets your posted field and modifies the job search query
     */
    add_filter( 'job_manager_get_listings', 'filter_by_salary_field_query_args', 10, 2 );
    function filter_by_salary_field_query_args( $query_args, $args ) {
    	if ( isset( $_POST['form_data'] ) ) {
    		parse_str( $_POST['form_data'], $form_data );
    		// If this is set, we are filtering by salary
    		if ( ! empty( $form_data['filter_by_salary'] ) ) {
    			$selected_range = sanitize_text_field( $form_data['filter_by_salary'] );
    			switch ( $selected_range ) {
    				case 'upto20' :
    					$query_args['meta_query'][] = array(
    						'key'     => '_job_salary',
    						'value'   => '20000',
    						'compare' => '<',
    						'type'    => 'NUMERIC'
    					);
    				break;
    				case 'over60' :
    					$query_args['meta_query'][] = array(
    						'key'     => '_job_salary',
    						'value'   => '60000',
    						'compare' => '>=',
    						'type'    => 'NUMERIC'
    					);
    				break;
    				default :
    					$query_args['meta_query'][] = array(
    						'key'     => '_job_salary',
    						'value'   => array_map( 'absint', explode( '-', $selected_range ) ),
    						'compare' => 'BETWEEN',
    						'type'    => 'NUMERIC'
    					);
    				break;
    			}
    			// This will show the 'reset' link
    			add_filter( 'job_manager_get_listings_custom_filter', '__return_true' );
    		}
    	}
    	return $query_args;
    }
    		<?php do_action( 'job_manager_job_filters_search_jobs_end', $atts ); ?>
    	</div>
    
    	<?php do_action( 'job_manager_job_filters_end', $atts ); ?>
    </form>
    
    <?php do_action( 'job_manager_job_filters_after', $atts ); ?>
    
    <noscript><?php _e( 'Your browser does not support JavaScript, or it is disabled. JavaScript must be enabled in order to view listings.', 'wp-job-manager' ); ?></noscript>

    crap. I have no idea where the error log is ๐Ÿ™
    as far as I know I can’t see my error log…

    I know – I’ve posted the log file in the link

    log
    this wordpress in czaplicka.eu/hop/ and I used the script around 15:00. I can’t see any info about the error, but maybe you will.

    when I press sync media.
    the newest WP and plugin.
    I’m not sure how to get the error log – maybe on SaturdayI’ll be able

    Forum: Plugins
    In reply to: [Timelines] Timelines

    I installed it and edit some stuff, so I got something what was a horrible, but working timeline, so for me it’s working.

    Forum: Plugins
    In reply to: [Timelines] Timelines

    I have no idea how to set it up – help?

    for ex. http://www.homoseksualizm.org.pl/index.php/category/codziennosc/coming-out-lifestyle/

    you can translate the page by the toolbar on bottom of the page. the categories are under the logo (start, codziennoล›ฤ‡ ect.)

    It works ๐Ÿ˜‰
    great and thank you

    PS if by any chance you would have idea why does my categories do not work I would be very, very greatful and I would totally make a donation for you.

    http://www.homoseksualizm.org.pl
    I don’t have any kind of cache plugin

    might be JR Compression? but I did turn it off and still it didn’t work.
    other java works fine.

Viewing 15 replies - 1 through 15 (of 22 total)