• Resolved kateamann

    (@kateamann)


    Hello,

    I have a site in development and the settings for padding/margin and border controls are not showing for the icons.

    I’m using a set of custom icons, but I’m not sure if this would affect what settings are showing. They aren’t showing on the native WordPress icons either.

    How can I get these working?

    Cheers,
    Kate

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello Kate,

    did you find a solution? I have the same problem.

    Best Regards
    Philipp

    Plugin Author Nick Diego

    (@ndiego)

    Hi @kateamann and @pstranghoener,

    I seem to have missed the original posting of this question, my apologies!

    The Icon Block uses native WordPress block supports for dimensions (padding/margin) and border control. There’s a chance that these controls are not supported by your WordPress version or theme. One easy way to check is to add a new Group block to the page/post and check if the Group has both dimension and border controls. If it doesn’t, then these controls are “globally” unavailable. If it does, then that would point to an issue/conflict in the Icon Block plugin itself.

    Either way, can you let me know what version of WordPress you are using as well as your theme?

    Thanks, and I look forward to hearing from you.

    Best,
    Nick

    Hi @ndiego

    thanks for the reply.

    Iam using WordPress 6.0.2 and the Theme is Twenty Twenty. I think it should work with these or?

    Edit: Plugin Version is 1.3.1

    Best Regards Philipp

    I have checked it again and with Twenty Twenty-Two it works.

    What do i have to do that it works with my theme?

    Best Regards Philipp

    Plugin Author Nick Diego

    (@ndiego)

    Hi @pstranghoener,

    Thank you for this additional information. Yes, Twenty Twenty is a classic theme and does not natively support these Appearance Tools or Spacing contols. However, you can easily add them if you are comfortable with editing the functions.php file of the theme and activating the Gutenberg plugin.

    To do so, you will want to add the following anywhere inside of the twentytwenty_theme_support() function in the functions.php in the Twenty Twenty theme. Line 147 is where I added them in my testing.

    
    add_theme_support( 'appearance-tools' );
    add_theme_support( 'custom-spacing' );
    

    Now when you edit an icon in the Editor, you will see the Dimension and Border panels in the sidebar. In the future, you will hopefully not need Gutenberg and Core WordPress will support the addition of Appearance Tools in classic themes, but until then it is needed.

    I will add this information the plugin FAQ and description later this week for others that might run into the same issue.

    Let me know if I can answer any additional questions.

    Best,
    Nick

    I activated Gutenberg and set add_theme_support for appearance tools and custom spacing. Do see border now, but not per side border options like top, right, bottom. left.

    Other issue is also that the theme color chosen for border and 2px size is shown as a black border frontend. This is also the case using

    $editor_settings["__experimentalFeatures"]["border"]["color"] = true;
    $editor_settings["__experimentalFeatures"]["border"]["style"] = true;
    $editor_settings["__experimentalFeatures"]["border"]["width"] = true;

    Any ideas why we do not get border settings per side as shown at https://www.ads-software.com/support/article/border-settings-overview/ ?

    Any idea why frontend the border is black and not the chosen color?

    • This reply was modified 1 year, 10 months ago by Rhand.
    Plugin Author Nick Diego

    (@ndiego)

    Hi @rhand. It sounds like you are using a classic theme, is that correct? If you have Gutenberg enabled, you can add theme support for appearance tools.

    add_theme_support( 'appearance-tools' );

    This will give you access to full border support. I tested in the core Twenty-Ninteen and Twenty-Eighteen themes (both classic themes) and both work as expected.

    If you continue to experience issues, can you share the theme you are using? Also a link to an example of an icon with the black border might help me diagnose what’s going on in the theme. Finally, are you seeing border controls on other blocks like the Group block?

    Thanks,
    Nick

    Using only this code:

    add_action( 'after_setup_theme', function() {
        add_theme_support( 'editor-font-sizes', array() ); // Equivalent to typography.fontSizes.
        add_theme_support( 'custom-line-height' ); // Equivalent to typography.lineHeight.
    	add_theme_support( 'custom-spacing' ); // Equivalent to spacing.
    	add_theme_support( 'editor-gradient-presets', array() ); // Equivalent to color.gradients.
    	// add_theme_support( 'custom-units', array() ); // Equivalent to spacing.units.
    	add_theme_support( 'appearance-tools' ); // Requires Gutenberg 14.0 or greater for now.
    } );

    and no Gutenberg plugin I do see padding, but no basic border settings nor margin as an option. We are using a Genesis child theme. I understood I needed Gutenberg and with this plugin active I do see basic borders but only an option for color and size for all sides. And adding style to added class is a challenge.

    Plugin Author Nick Diego

    (@ndiego)

    Hi Rhand,

    I just tested with the latest version of Genesis and the Genesis Sample theme. I installed and activated Gutenberg and added the following to the functions.php file of the Genesis Sample theme.

    function genesis_theme_supports_setup() {
    	add_theme_support( 'appearance-tools' );
    }
    add_action( 'after_setup_theme', 'genesis_theme_supports_setup' );

    This enabled the border panel. By default, the border control will allow you to change the color and width of all sides. However, if you click on the little link icon to the right of the slider, this will allow you to control border on each side. The same is true for border-radius.

    Let me know if you continue to experience any issues.

    Best,
    Nick

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Unable to see border and spacing settings’ is closed to new replies.