Custom Post Type 'Employees": add missing fields

Hi,

on the custom post type ‘employees’ I miss some standard fields like:

phone
mail
fax

(—1---)

Is there a way to add the missing fields to the post type ‘employees’ so I am able to set the values in separated fields?

Updating the single-employee.php and archive-employee.php in child-theme isn’t the problem that case.

(—2---)

Is there a way to use the new added fields with the employee-widget(s) for siteOrigin PageBuilder? (Adding some lines for phone and mail should not be the world … how doing it in a child-theme? … any hint helps)

(–3--)

Why to hell did you forget to add such important basic fields (maybe to use in optional manner) in this wonderful theme? (Last question --> take it easy please, it’s just some humor/irony)

Thanks, :slight_smile:

Hi,

You cannot add new fields, but you can use any other values for the existing ones and change the icons if you want.

We didn’t forget to add them, it’s just that the design wouldn’t permit for too many links. It would just look ugly.

Hi,

thx for fast reply.

Unfortunately … the page is for a customer … and I need clean fields with names which describes the real usage … ‘use of other values’ is not a solution in this case. So coding seems to be the solution?

Additional Question:

Do you have a hint maybe how to change the shown names of the fields in WP Admin (the edit page: ‘employees’)? (Some quick short (examples) lines to add in the functions.php WOULD HELP VERY MUCH.

Do you (or anyone else) have a some hints to me for my second question:

Is there a way to use the new added fields with the employee-widget(s) for siteOrigin PageBuilder? (Adding some lines for phone and mail should not be the world … how doing it in a child-theme? … any hint helps)

Or more important: as it is my first project working with SiteOrigin PageBuilder … how do I have to handle an update for Widgets in the child-theme …? (I don’t wonna change the code in the original theme.)

Thanks :slight_smile:


[- off topic -]
… ugly looking?
… nice looking features are not a solution
… if basic information are missing

… and jm2p about information concerning employees:
… social media buttons looks very nice :wink:
… but to contact an employee information about mail or phone helps even more
… rather more than a nice looking G+ symbol

… your designer for this theme does a wonderfol job
… and I am sure: he could workout even a nice looking phone/mail information too :slight_smile:

Please take this just as an users hint to make a good theme better …
… and of course not all user asked features have to be realized :wink:

Hi,

I’m really sorry, but what you’re asking for requires lots of PHP coding and that’s way beyond our support policy, that’s why I suggested to just change the icons.

Some hints: new custom fields (or name changing for Employees etc.) can be changed from the Sydney Toolbox plugin. Just like the original ones are added you can create new ones.
Newly created fields can be displayed in the employees section just like the original ones are displayed.
The easiest way would probably be to just copy the employees widget and create yourself a new one. Loading and registering a widget is simple.

Hi,

thx for answer.

But no: for sure you are not asked for coding … just some hints how to solve it or maybe if possible three or four quick example lines of codes if it could be done this way … coding will be done here … that for at the moment I try to understand your framework. (Very nice theme at all!!!)

Your hints are welcome … unfortunately I don’t understand them yet (but with your help the way becomes more clear):

(–1--)

What do you mean with ‘[easy] change the icons’. I did not see any field in the cusomizer to chose the icons for single-/archive-employee? Do you mean an exchange in code (where?) or by (child-theme-)css or is there another trick?

(–2--)

new custom fields (or name changing for Employees etc.) can be changed from the Sydney Toolbox plugin

Good hint. Thx. As I cannot find any settings fields in the theme for Sydney toolbox plugin … do you mean to change code in the plugin … but as I know all changes will be be removed on next update … and overwriting a plugin in the child theme is not possible at all … ?

(–3--)

copy the employees widget and create yourself a new one

Thx. Indeed that was the way I thought about it. My Question is: does SiteOrigin PageBuilder need a ‘special registration’ or ‘widget handling’ … or is there anything I have to think about which differs from ‘normal’ WP widgets?

Thanks, :slight_smile:

AND:
Sorry for beeing a little bit confused at the moment :frowning:

Hi,

  1. What I meant was with some custom CSS. For example instead of adding your Facebook profile in the FB field you add something like tel:+111111, then with CSS we change the FB icon with a phone icon.

  2. What I meant was to duplicate the code in sydney-toolbox/metaboxes/employees-metabox.php. You can copy that file in your child theme, modify as needed and then load it. So you don’t mess with the plugin’s code.

  3. Nothing special, they’re just regular widgets and SO loads them automatically. You can see how they’re loaded in the functions.php file in the theme.

Hi Vlad,

ok … thanks for the hints.
That helps very much and now the way became clear :slight_smile:

Just an addidional question to your hint:

As I only need two custom page types for this project:
employees
services

Am I able to move the php-files (for custom page types and metaboxes) for both page-types to the child theme and deinstall the plugin sydney-toolbox? Or will this make trouble?

Thanks for help.

Kind regards
Wulf

Hi,

Probably better and easier would be to unregister the post types you don’t need from inside your child theme: https://developer.wordpress.org/reference/functions/unregister_post_type/
You can however move them if you want to your child theme.

Hi Vlad,

once more thx for your hints.
Yes. I know the functions and had done it with it before.


Your hint to move the Sydney Toolbox plugin files to the child theme works well …

… now I only need to activate the custom post type I need for the project

… and I am able to adapt the code to the needs of the project without destroing the theme functions for employees: archive, single-page, SO PageBuilder widgets.

… and don’t have trouble with later updates in this project :wink:


Kind regards,

Wulf

PS:
Your hints helped me to solve the other question I posted in another thread today. Great job :slight_smile: