Support » Plugin: WP Job Manager » Jobs not showing on [jobs orderby=date] page

  • Resolved ouegy

    (@ouegy)


    Hi,

    I have some jobs posted to the site from a third-party.

    They appear in the database and the backend, but only on the [jobs] page if I go and manually save again from the backend.

    Any ideas?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor jonryan

    (@jonryan)

    @ouegy can you clarify what you mean by manually save in the backend? The job listings themselves or the jobs page?

    @jonryan Clicking ‘update’ on a job from the dashboard.

    Plugin Contributor Davor

    (@davoraltman)

    Hi there,

    Just to clarify – when someone submits a listing on your site from the front end, it doesn’t show up in the [jobs] page unless you click on the Update button for that particular job on the backend?

    If that’s the case, it’s not something I can reproduce. Do you have the ‘Moderate New Listings’ option ticked inside Job Listings -> Settings -> Job Submission?

    Also, can you try temporarily deactivating other plugins on the site to check whether one of them is causing the problem? – https://wpjobmanager.com/document/detecting-plugin-issues/

    Let me know what you find out.

    Thanks,
    Davor

    Hi Davor,

    Yes, that is what is happening, although the listings are submitted from a third party website.

    That option is not ticked.

    Adding a job from the back end has no problems.

    Thanks,

    Ian

    I don’t think this is a plugin conflict either.

    I have this happening on 3 different sites, which have different versions of WordPress and Job Manager installed, as well as different plugins…

    I do have a CRON job running, to check whether the job should still be “featured”, although this code has been in place for quite a while with no issues.

    /* Cron job to check whether job still needs to be featured */
    add_action('my_daily_event', 'do_this_daily');
    
    function my_activation() {
    	if( !wp_next_scheduled( 'my_daily_event' )) {
    		wp_schedule_event( current_time( 'timestamp' ), 'daily', 'my_daily_event');
    	}
    }
    add_action('wp', 'my_activation');
    
    function do_this_daily() {
    	global $wpdb;
    	
    	$results = $wpdb->get_results(
    	"SELECT ID, post_date_gmt
    	FROM wp_posts
    	WHERE post_type = 'job_listing'"
    	);
    	
    	$jobdates = array();
    	foreach($results as $oneitem) {
    		$jobdates[$oneitem->ID]=$oneitem->post_date_gmt;
    	}
    	
    	foreach($jobdates as $key => $value) {
    		$postdate = $value;
    		$id = $key;
    		$today = time();
    		$postdate = strtotime($postdate);
    		$difference = round(abs($today-$postdate)/60/60);
    		if($difference > 72) {
    			$wpdb->query( $wpdb->prepare(
    			"UPDATE $wpdb->postmeta
    			SET meta_value = replace(meta_value, '1', '0')
    			WHERE meta_key = '_featured'
    			AND post_id = %d", $id ));
                            WP_Job_Manager_Cache_Helper::get_transient_version( 'get_job_listings', true );
    		}
    	}
    }
    • This reply was modified 2 years, 9 months ago by ouegy.

    I have resolved this but I don’t know why this works:

    The shorcode I was using [jobs orderby=date show_pagination=true]. The new job posts did NOT show up.

    I changed the shortcode to [jobs orderby=date order=desc show_pagination=true], and now they show up.

    Plugin Support Dat Hoang

    (@htdat)

    Hi there,

    > I have resolved this but I don’t know why this works:

    Glad to hear that! I am marking this ticket resolved. It seems there is a conflict on your site.

    Best Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Jobs not showing on [jobs orderby=date] page’ is closed to new replies.