• Resolved shimu666

    (@shimu666)


    Hello, Your plugin is wonderfull. It’s exactly what i need.

    I have a job board site with the wp job manager plugin + application addon.

    In fact when a user reply to a job announce, in the job dashboard you can see all the meta custom field with the name and so on…

    I would like to create a link to the um user profil who replied to the job.
    But when i try it’s redirecting to the current user and not to the one who reply to the job announce.
    I saw in your plugin file : echo um_user_profile_url();
    The string to the one who replied to job is _candidate_user_id

    How to create a link so when the user click on the name for exemple he’s redirected to the user profil of the one who reply to job.

    <a href="<?php
    		global $ultimatemember;
    		$url = um_user_profile_url();
    		echo esc_attr( $url );?> "><?php echo $application->post_title; ?> </a>

    Thanks for your help.

    https://www.ads-software.com/plugins/ultimate-member/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Ultimate Member

    (@ultimatemember)

    um_fetch_user( $user_id );

    then use um_user_profile_url();

    Should work!

    I am working on addon for it to make it comatible with WP Job Manager.If you have any suggestions ?

    Thread Starter shimu666

    (@shimu666)

    Thanks for your quick reply. It works but not as i wanted. (but it’s good to know how to fetch a specific user :).

    The problem is that i have to use a userId with um_fetch_user( $user_id ); but i want to display the user that reply to the job not a specific user or current user. I mean the candidate id.

    And i don’t know how to do that.
    The author plugin of application addon told me that i have to use _candidate_user_id but i can’t figure it out.

    Here the code where the user id is used:

    function user_has_applied_for_job( $user_id, $job_id ) {
    		if ( ! $user_id ) {
    			return false;
    		}
    		return sizeof( get_posts( array(
    			'post_type'      => 'job_application',
    			'post_status'    => array_merge( array_keys( get_job_application_statuses() ), array( 'publish' ) ),
    			'posts_per_page' => 1,
    			'fields'         => 'ids',
    			'post_parent'    => $job_id,
    			'meta_query'     => array(
    				array(
    					'key' => '_candidate_user_id',
    					'value' => absint( $user_id )
    				)
    			)
    		) ) );
    	}
    }

    Plugin Author Ultimate Member

    (@ultimatemember)

    How use _candidate_user_id ? did he give you more details?

    Thanks!

    Thread Starter shimu666

    (@shimu666)

    No ?? he just told me “This is stored in the application post meta as _candidate_user_id”. I’m a little lost.
    I really don’t know how to retrieve to id of user who reply to the job.
    and it would be very usefull to see the candidate ultimate member profile when click on a links. ??

    Thanks

    Thread Starter shimu666

    (@shimu666)

    to generate the user application id it’s
    $user_id = get_post_meta( $application->ID, ‘_candidate_user_id’, true );
    How to generate this url : mysite.com/user/
    like that i can add $user_id to get :
    mysite.com/user/$user_id
    ?
    thanks for you help. I feel i’m close. ??

    Plugin Author Ultimate Member

    (@ultimatemember)

    um_fetch_user( $user_id );
    $profile_url = um_user_profile_url();

    Thats it

    Thread Starter shimu666

    (@shimu666)

    ??

    Ultimate Member Super Dev !!! That’s work. Thanks a lot.
    for those whos’ interested

    <a href="<?php
    $user_id = get_post_meta( $application->ID, '_candidate_user_id', true );
    um_fetch_user( $user_id );
    $profile_url = um_user_profile_url();
    echo esc_url( $profile_url, $user_id ); ?>"><?php echo $application->post_title; ?> </a>

    it will create a links to the um user profile candidate with the application addon.

    Thanks a lot again. U rocks.

    Plugin Author Ultimate Member

    (@ultimatemember)

    Thank you ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Links with Wp job manager’ is closed to new replies.