Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    I assume you mean independent from the “my jobs” page and public? This doesn’t exist right now as a shortcode, so you would need a get_posts query. This is one from core:

    $args = apply_filters( 'job_manager_get_dashboard_jobs_args', array(
    			'post_type'           => 'job_listing',
    			'post_status'         => array( 'publish', 'expired', 'pending' ),
    			'ignore_sticky_posts' => 1,
    			'posts_per_page'      => -1,
    			'orderby'             => 'date',
    			'order'               => 'desc',
    			'author'              => PUT_USER_ID_HERE
    		) );
    
    		$jobs = get_posts( $args );

    That will return or jobs for a user if you replace ‘PUT_USER_ID_HERE’ with the user profile ID.

    Thread Starter NicoPagel

    (@nicopagel)

    But I want this code in every single Member side, what can I Do with the PUT_USER_ID_HERE then?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    A little more thinking about this, a shortcode probably wouldn’t work anyway because you need a dynamic user ID (so you can query the user you are viewing).

    So the above code could be built into a template for example.

    I’m not fully familiar with Buddypress – I would imagine it has a function to get the user ID for whomever you are viewing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Echo the jobs by an user?’ is closed to new replies.