Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1130393

    Hi, we didn’t find answers to the following two topics:

    1. How can we define “custom buttons”, e.g. https://www.dropbox.com/s/ym3rqjihlf9z9dn/button.jpg?dl=0
    So the symbol on the right side of the button should have the height of the button.

    2. How can we define individual font colors to be easily used in WordPress editor? E.g. https://www.dropbox.com/s/yizimk83jwgmrm1/font-individual-color.jpg?dl=0
    We want to define them in Enfold child theme.

    Thanks a lot.

    #1130430

    Hey Jochen,

    These are both tasks that can be done via css class names. You set the styles in css and then add the class name to each element that should need that styling.

    Best regards,
    Jordan Shannon

    #1130724

    Hi Shannon,

    thanks for your reply – but that was already clear to us.
    * Can you please send a code example?
    * How can we define custom colors, to be used “per click” in the WordPress editor? What do we neeed to create in Enfold child theme?

    BR, Jochen

    #1130814

    Hi Jochen,

    1. You will likely need custom CSS for that, could you post a link to where we can see the element in question?

    2. I’m not sure what you mean by “per click”? If you want to assign classes to elements in the layout builder then you can activate that functionality under Enfold->Layout Builder. Look for the Show element options for developers options.

    Best regards,
    Rikard

    #1130889

    Hello Rikard,
    thanks for your reply.

    ad 1.
    Well, the web page with this kind of customized buttons is net yet live.
    But you could think of extending this type of code
    === snip ===
    [av_button label='Mehr erfahren' link='manually,/use-cases/' link_target='' size='medium' position='left' label_display='' icon_select='yes-right-icon' icon='ue87d' font='entypo-fontello' color='custom' custom_bg='#e4004d' custom_font='#ffffff' av_uid='av-6zgei' admin_preview_bg='']
    === end snip ===
    so that it looks like https://www.dropbox.com/s/ym3rqjihlf9z9dn/button.JPG?dl=0

    ad 2.
    We want to be able to define custom colors, so that they can be used in the standard WordPress-Editor an being selected by “click”
    https://www.dropbox.com/s/yizimk83jwgmrm1/font-individual-color.jpg?dl=0
    We want to fill the eight empty spaces under “Individuelle” with our own custom colors.

    HTH & kind regards

    Jochen

    #1131514

    Hello,
    I need to come back to my unsolved issue:
    Where can we define individual colors in the child theme?
    https://www.dropbox.com/s/ff5hmuc9z38tmk4/define-individual-colors-in-editor.jpg?dl=0
    Thanks, Jochen

    #1131835

    Hi,

    The color sets are defined in /wp-content/themes/enfold/includes/admin/register-backend-styles.php – it’s an array which uses the color scheme name as key and each color scheme contains a sub-array which stores the color values. You can modify the array directly or use the “avf_skin_options” filter ( http://codex.wordpress.org/Function_Reference/add_filter ) to add your custom schemes.

    Best regards,
    Basilis

    #1132198

    Hi Basilis,
    thanks a lot. How can we use this in a child theme?

    BR, Jochen

    #1132341

    Hi,

    You would want to recreate the folder structure he mentioned above within the child theme, so you would have:

    enfold-child/includes/admin/register-backend-styles.php

    Then make the changes there.

    Best regards,
    Jordan Shannon

    #1132362

    Hi Shannon,

    thanks a lot – we’re coming closer.

    We’re using here “Splash Blue”

    In the “register-backend-styles.php”, for “Splash Blue” are defined tons of variables.

    Right now, we want to add two colors:
    #e4004d and #4e748b

    -> What do we need to add in enfold-child/includes/admin/register-backend-styles.php, so that we can use these colors in thw WordPress editor?

    Thanks a lot.

    #1133736

    Hi,

    Thank you for the update.

    Another user provided a possible solution in the other thread. Please continue there.

    // https://kriesi.at/support/topic/erweiterter-text-editor-textfarbe-individuelle-farben-default/#post-1133323

    You need to add this filter in the functions.php file.

    function avf_tiny_custom_colours( $init ) {
     $custom_colours = '
     "696969", "Darkgray",
     "fofofo", "Hellgrau",
     "f4f7fc", "Hellblau",
     "BFCDDB", "Hellblau-2",
     "A0A0A0", "Hellgrau-2",
     "C8C8C8", "Hellgrau-3",
     "000000", "Schwarz"
     ';
     $init['textcolor_map'] = '['.$custom_colours.']';
     return $init;
    }
    add_filter('tiny_mce_before_init', 'avf_tiny_custom_colours');
    

    Best regards,
    Ismael

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.