i created a page using a shortcode [wp_freeio_change_profile] but some information i need to change them as you will see in the screenshot
First: i want to display on the drop down categories “employers-category” instead off “services-category”
Secondly: location i want it to display all countries (it shows nothing )
Third: i want to add another checkbox calling type
i tried using code but i didn’t know which page to edit cause there are manyenter image description here
Anas Mourabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Changing the Profile Page Shortcode
Thank you for providing the details about the changes you would like to make to the profile page shortcode. I’d be happy to help you with that.
1. Changing the Category Dropdown
To display the “employers-category” instead of the “services-category” in the dropdown, you’ll need to modify the shortcode parameters. This typically involves editing the template file or the plugin’s code.
If the shortcode is implemented using a plugin, try adding the following parameter to the shortcode:
[wp_freeio_change_profile category_taxonomy="employers-category"]
This modification should display the “employers-category” in the dropdown instead of the “services-category”.
2. Displaying All Countries in the Location Dropdown
To display all countries in the location dropdown, you should:
- Check the Plugin Settings: Many plugins provide settings to customize dropdowns. Look for an option in the plugin’s settings that enables displaying all countries.
- Modify the Template File: If there is no setting available, you may need to edit the template file where the shortcode is used. This file is usually located within the plugin’s directory or your theme’s directory.
Here’s an example of how you might adjust the code:
$countries = get_all_countries(); // Hypothetical function to fetch all countries
foreach ($countries as $country) {
echo "<option value='{$country->code}'>{$country->name}</option>";
}
If you’re unsure where to make these changes, refer to the plugin’s documentation or support team for guidance.
3. Adding a Type Checkbox
To add a new checkbox for the “type” field, follow these steps:
- Locate the Appropriate File: Identify the template file or the part of the plugin code responsible for generating the form. This could be in your theme’s files or within the plugin’s files.
- Add the Checkbox HTML: Insert the necessary HTML and PHP code to include the checkbox.
Example:
<label for="type">Type:</label>
<input type="checkbox" id="type" name="type" value="desired_value"> Desired Label
Example PHP to handle the checkbox value:
if (isset($_POST['type'])) {
$type_value = $_POST['type'];
// Process the value as needed
}
Additional Resources
If you’re not familiar with modifying plugin code or template files, consider the following resources:
- Plugin Documentation: Check the documentation for detailed instructions on customization.
- Plugin Support: Reach out to the plugin’s support team or community forums for assistance.
Please let me know if you have any other questions or need further assistance. If you can share the specific plugin or theme you’re using, I can provide more detailed guidance.
priyanga dilshan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.