This is a tutorial  to guide you  how to Add more skills in the profiles in FreelanceEngine.

Previously, when freelancers create their profiles, they are only able to add 5 skills. What should they do if they have more skills than 5 and want to impress the job-seekers with their qualifications?

It’s very simple. Just add these code into child-theme/functions.php file

add_action('wp_footer','increase_max_skill', 115);
    function increase_max_skill(){
   	 ?>
   	 <script type="text/javascript">
   		 (function($, Models, Collections, Views) {
   			 $(document).ready(function() {
   				 Views.Skill_Control.prototype.addSkill = function(skill) {
   		             // this.model.set('skill', []);
   		             var duplicates = this.skill_list.find('input[type=hidden][value="' + skill + '"]'),
   		                 count = this.skill_list.find('li');
   		             if (duplicates.length == 0 && skill != '' && count.length < 10) {
   		                 var data = {
   		                     'name': skill
   		                 };
   		                 this.collection.add(new Models.Skill(data));
   		                 $('input#skill').val('');
   		             }
   		         }
   			 });
   		 })(jQuery, window.AE.Models, window.AE.Collections, window.AE.Views);
   	 </script>
   	 <?php
    }

After that, the system of FreelanceEngine will allow freelancers to include as many skills as defined in the code!

However, if the ‘Select Skill From Predefined List’ option, which is in the Content, is selected, the system would not allow the users to add more than 5 skills. At this case, you have to edit code in js/profile.js file, in line 165

max_selected_options:5,

change the number 5 to the skill number you want freelancers can set.

Hope that this tutorial is helpful. If you have any problem while editing it in FreelanceEngine theme, you can send a ticket via EngineThemes forum. Our technical support staff will help you solve the problem.

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.