Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support Alin (a11n)

    (@alinclamba)

    Hi @edmario,

    If you are not able to view any jobs in the job dashboard, it could indicate a few different issues with WP Job Manager. However, a common cause for job listings not showing up is a javascript error. Since jobs are loaded via ajax, checking for Javascript errors should help to diagnose the problem.

    Here’s how to check for Javascript errors in Chrome:

    1. Go to your jobs page
    2. Right-click the page and click “Inspect”
    3. Go to the “Console” tab and view any errors that appear

    If there is a JavaScript error, you need to work out which plugin (or theme) is causing it and fix it (or disable the plugin). If you are unsure, you can disable everything and enable one item at a time until the error occurs.

    For more information on how to diagnose issues with WP Job Manager, take a look at their documentation about job listings not showing up in the [jobs] page here:

    https://wpjobmanager.com/document/job-listings-not-showing-up-in-the-jobs-page/

    Let me know if this helps! If not, please let us know and consider sharing the site URL for further investigations.

    Thank you!

    Thread Starter edmario

    (@edmario)

    No error was found as we can see in the image:

    The strange thing is that if I add the code I found around here:

    add_filter( 'job_manager_get_dashboard_jobs_args', function( $job_dashboard_args ) {
    	$user  = wp_get_current_user();
    	$roles = ( array ) $user->roles;
    
    	if ( ! empty( $roles ) && in_array( 'employer', $roles, true ) ) {
    		unset( $job_dashboard_args['author'] );
    	}
    
    	return $job_dashboard_args;
    } );

    Jobs appear, but from all employers to all employers. Here’s the image:

    Would it be possible to show only the jobs of the logged in user?
    Any code or other ideas?

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi there, @edmario,

    I’ve asked our developers to take a deeper look at it – we’ll circle back once we hear from them ?? Thanks for your patience!

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hey @edmario,

    Just to make sure I am passing the correct information to our developers to help:

    • your goal is to allow each employer to see only their own jobs on the dashboard
    • initially, view and edit options didn’t show up in your site
    • you tried the code on this other forum thread which fix the job listing views, but allow the view to everyone, also logged out users, which is not what you want

      Can you confirm if I’m missing something? Thanks!
    Thread Starter edmario

    (@edmario)

    Hey Stef @erania-pinnera ,

    Almost all of your information is correct.

    Only the last part I need to explain better:
    Does not appear for logged out users. Which is correct.
    However, on the job edit page in the dashboard, the jobs of all logged in users appear for all other logged in users and not just the jobs that were created by the logged in user.
    If a user is logged in and goes to the edit page to manage his jobs, he can view the jobs of other users on the edit page.

    Thank you for your attention.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hey @edmario,

    Thanks for the further clarification! I passed it to our developers; we’ll circle back as soon as possible.

    Thanks for bearing with us while we work on this ??

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hello @edmario,

    Apologies if we still sound confused, but we still are a little ??

    We spoke with our developers, and they confirmed that your goal seems to be to get logged-in users to see only their jobs in the dashboard. This should happen by default.

    They believe that the snippet you are referring to updates the query to return all the listings might be preventing this default action from happening; can you try to stop using the snippet and see how it goes?

    If nothing helps, we may need you to explain a bit better once again what you want to achieve in the first place.

    Thread Starter edmario

    (@edmario)

    Hello @erania-pinnera Stef,

    No problem, I appreciate your dedication to helping me.
    Yes, the goal is to have logged in users only see their jobs on the dashboard, however jobs don’t show up by default. And, as I put in the previous prints, there doesn’t seem to be any javascript errors.
    I put the snippet just to see if it worked, if any job appeared and it did! But as expected this snippet is for another situation.

    In the image below I am logged in with an employer account that has published jobs, but no job appears:

    Thanks again for your help

    Plugin Support Deric (a11n)

    (@dericleeyy)

    @edmario , to summarize, you only want to display the job listings which the logged in user owned, after logging in.

    We have the Job Dashboard which does this by default without any code snippet:
    https://wpjobmanager.com/document/the-job-dashboard/

    Using the code snippet that you found, it’s used to remove the filter for the logged in user to be the author:

    unset( $job_dashboard_args['author'] );

    You mentioned, without this code, no Jobs is displayed. Can you confirm that the current test logged in user has job published on the site?

    Thread Starter edmario

    (@edmario)

    Hi, @dericleeyy

    Yes, the user has two published jobs.
    The username is “Loja Teste”
    I’m not currently using any snippets.
    Check out the prints below. At first everything is ok, except on the dashboard:

    Plugin Support lastsplash (a11n)

    (@lastsplash)

    Hi @edmario

    Looking at your last message, I think it’s possible that there might be a conflict with one of your current plugins or your theme.

    Try disabling all of your plugins except WP Job Manager. Then try testing again to see if the issue persists. If that resolves your issue, you can find what was causing it by enabling each plugin one by one while continuing to test.

    If that doesn’t help, you can also try switching to the Storefront theme via Appearance > Themes, and test again. If the issue is resolved then you know it’s a problem with the theme, and you’ll need to contact the theme author for further assistance.

    Let us know how it goes.

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello @edmario

    Do you have updates about that? We usually close inactive threads after one week of no activity, but we want to make sure we’re all set before marking it as solved. Thanks!

    Thread Starter edmario

    (@edmario)

    Hi @tamirat22 ,

    The problem is with the theme. I switched to another theme and the job list appeared.
    I will check with the theme developer to see if anything can be done to resolve the issue.
    Thank you for your attention.

    Plugin Support Alba (a11n)

    (@ctdealba)

    Hi @edmario

    Thank you for getting back to us and for sharing the update. I’m glad the problem has been located. I wish you the best of luck with the theme developer, hopefully they can give you a fix.

    Have a great day!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Jobs do not appear on the dashboard’ is closed to new replies.