• Hello Folks,
    I fist of all apologize if the topic I’m creating has been discussed before but I haven’t quite what I was looking for. Here’s my deal:
    I’ve installed a theme on my wp-site named travel-log and wanted to create a button on a post page with the same features as the one of the theme. Shouldn’t the block editor provide me by default with the theme custom buttons? Instead the editor provides me with 3 basic types buttons and I don’t know how to turn them into the one provided in the customized theme pages (i.e. border-radius, color change, ect.). Is there a way to make the editor apply the theme style on its contents?
    Many thanks for your attention and to how may respond.
    PS I’m actually using a child theme of the travel log theme.

Viewing 1 replies (of 1 total)
  • The editor contains some default styles. The theme can add to them or not. The theme can style HTML elements like <button> and the block editor is probably styling a Button block (which is not a HTML <button> but is a link with a background color).
    This is most likely the case when the theme existed before the block editor.
    The theme has to account for all situations of HTML, so it styles the basic HTML elements. It might not add styles for every little block that developers come up with (which are also HTML, but have class names to make them “blocks” and there’s no way for the theme to style all “blocks” that plugins come up with).

    The problem with buttons in particular is that a <button> by itself does nothing. It needs to be in a form (like Submit) or have some javascript to make something happen when you click it. A link, however, navigates to a page when clicked, and can be styled to look like a button. It’s really better for accessibility to use the correct element for the job at hand so that screen readers and browsers do the expected thing. The editor’s Button block is not really a button. It’s a link.

    You can ask at your theme’s support forum for the trick to getting the theme’s button (but it might be useless to you without a form or script), or how to style Button blocks (links) like the theme’s buttons. (in other words, for the theme to support the core blocks by styling them)

Viewing 1 replies (of 1 total)
  • The topic ‘editor block button features as theme button’ is closed to new replies.