NooTheme Premium WordPress Theme › Forums › JobMonster › Image Badge On Company Info on Job Listing Page
Tagged: Company info
- This topic has 5 replies, 2 voices, and was last updated 2 years ago by Jackie.
-
AuthorPosts
-
2 years ago #1218142
Hi Support
I'm wanting to add an image to active members of ours on our website.
I currently have a meta field in Users > Profile and there is a yes/no field that I have created.On the website, I have added layout>Company>company-info.php to my child theme.
Issue
I need some help with my current coding to find out the connection between the USER connected to the job listing and how I can use it in my code to display my image based on the user field being = yes.Can you please help?
<?php// Call Data From User Profile For Is WBN Member?$user_id2 = get_current_user_id();$wbnmemberstatus = get_user_meta($user_id2, 'wbn_member', true);?>WBN Member<?php //Show status on job listing page if($wbnmemberstatus == 'yes'): ?> " /><?php endif; if($wbnmemberstatus == 'no'): echo 'Not Working'; endif; ?>The end result
Please see the image attached. I want this image to appear on these job listings only for users where we have marked "Yes" in a user meta field box.Kind Regards,
Peter LowenAttachments:
You must be logged in to view attached files.2 years ago #1218149Hello.
Thank you for contacting us.
For the job listing page, you can add the custom source code under the company logo in this file:
wp-content/themes/noo-jobmonster/layouts/job/loop/loop.php line 70-74.
Please add that file to your child theme to add the custom code.
Thanks.
2 years ago #1218152Hi Jackie
Thank you for the reply but the image as per the picture is in the right sidebar not in the loop replacing the Employers logo.
This line here in my code is what I need help with:
$user_id2 = get_current_user_id();
Can you please help me with how you connect which user is connected to which job listing?
Kind Regards,
Peter Lowen2 years ago #1218161Hi Peter.
Please give us your site URL, admin, and FTP account. We will help you check that.
Thanks.
2 years ago #1218170This reply has been marked as private.2 years ago #1218176Hi again.
We have checked and helped you fix that issue with the source code below:
$employer_id= Noo_Company::get_employer_id($company_id);
$wbnmemberstatus = get_user_meta($employer_id, 'wbn_member', true);
Please check it again.
Thanks.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.