• Is it possible to configure the css or js file to affect both frontend and admin?
    I’m using Gutenberg, if it affects anything.

    If i choose “In Frontend” – i can see changes only on the published page, or in preview mode.
    If i choose “In Admin” – i can see changes in wordpress admin panel and in block editor mode.

    The easiest option is to duplicate the files, one for the frontend and one for the admin, but this is not optimal.

    I need to see how page looks immediately in the block editor and at the same time for the css (or js) file to be active on the site. Is there a way to achieve this without duplicating files?

Viewing 1 replies (of 1 total)
  • Plugin Author SilkyPress

    (@diana_burduja)

    Using the custom CSS/JS codes in the Gutenberg editor is a valid issue, even if, at the moment I don’t have a solution for you.

    Adding a custom CSS/JS code both to the frontend and admin is not only a matter of changing the radio button option to a checkbox option. The plugin’s internal working was programmed to have only one value for the option. Eight years ago, when we’ve built the plugin, having only one value for the option seemed to be a reasonable assumption.

    Also rewriting the plugin’s internal working has to be done extremely carefully, so that no weird bugs show up in any of the 500,000+ websites on which the plugin is currently installed.

    We’ll try to work on a solution in one of the next plugin releases. Though, at the moment, it is not clear in which form the solution will be implemented. The most probable implementation will be that, if the Gutenberg editor is actively used on the website, then, with the “In Frontend” option, the custom code will automatically be applied also within the editor. Maybe also an option on the “WP Admin -> Custom CSS & JS -> Settings” page to turn on/off this behavior will give the plugin’s users more control.

    Thank you for reporting this use case. We’ll work on a solution, but at the moment you’ll have to check the changes on the published page, or in the preview mode.

Viewing 1 replies (of 1 total)
  • The topic ‘Frontend and Admin with Gutenberg’ is closed to new replies.