Okay
  Public Ticket #1193962
Adding extra icons
Closed

Comments

  •  2
    freqhack started the conversation

    Hi,

    Really enjoying using this theme so far. Just wondering if there's a fairly straightforward way to add additional icon sets to the PageBuilder icon selections?

    I can install a new icon set and add them through css, but I haven't been able to figure out how to load them into the PageBuilder icon selection list.

    Ideally having the new icons loaded in my child theme would be best so I don't need to re-do it each time I install an update.

    Thank you.

  •  347
    OrionThemes replied

    Hi, adding custom icons with child theme is possible. Please check example below, but make sure you give unique names to the functions (rename them):

    // step 1, create array of icons:
    function orion_add_dentist_icons( $icons ) {
           return array ( 
            'icon-parodontosis' => '',
            'icon-anesthesia' => '',
            'icon-protection' => '',
            'icon-toothbrush' => '',
            'icon-tooth-seal' => '',
            'icon-dental-caries' => '',
            'icon-x-ray' => '',
            'icon-paradonthosis' => '',
            'icon-patient-card' => '',
            'icon-pin-tooth' => '',
            'icon-teeth' => '',
            'icon-braces' => '',
            'icon-brush-your-teeth' => '',
            'icon-caries-defense' => '',
            'icon-certificate' => '',
            'icon-dentist-report' => '',
            'icon-healthy-tooth' => '',
            'icon-label' => '',
            'icon-medical-records' => '',
            'icon-medical-report' => '',
            'icon-cleaned-tooth' => '',
            'icon-cracked-tooth' => '',
            'icon-dental-calculus' => '',
            'icon-dental-care' => '',
            'icon-dentist' => ''
        );
    }
    add_filter('siteorigin_widgets_icons_dental', 'orion_add_dentist_icons');
    // step 2. connect them to stylesheet and add them into siteorigin
    function orion_widgets_icon_families_filter( $families ){
        $families['dentalicons'] = array(
            'name' => esc_html__( 'Dental Icons 1', 'dentalia' ),
            'style_uri' => get_template_directory_uri().'/libs/dental-icons/style-ot.css?111',
            'icons' => apply_filters('siteorigin_widgets_icons_dental', array() )
        );               
        return $families;
    }
    add_filter( 'siteorigin_widgets_icon_families', 'orion_widgets_icon_families_filter' );
    

    Kind regards,
    Andrej

  •  2
    freqhack replied

    Wow!

    Thank you for such and fast response.