Skip Navigation

[Resolved] Hide/ remove ‘dynamic sources’ for core blocks in the block settings

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to hide the Dynamic Sources button in the sidebar and inside the block editor?

Solution:

Add the code below to function.php file of your theme to hide the dynamic sources button inside the editor via CSS:

add_action('admin_head', 'chr_admin_css');
 
function chr_admin_css() {
  echo '<style>
    .components-toolbar .toolset-inline-field-button {
        display: none !important;
    }
  </style>';
}

Editor Dynamic Source

You can hide the sidebar option from the normal Gutenberg options (The three dot menu at the top right)

Sidebar Dynamic Source

This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 4 replies, has 3 voices.

Last updated by Paul Marconi 2 years, 1 month ago.

Assisted by: Christopher Amirian.

Author
Posts
#2491603
contextual-toolbar.PNG
sidebar.PNG

HI there,

We have Toolset Types and Toolset Views plugins installed and it seems to be adding this 'dynamic sources' in the sidebar block settings and in the contextual toolbar to core blocks. Is there a way to hide the 'dynamic sources' options in both places?
Screenshots attached.

Thanks!

#2492051

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Sorry, these are built-in features of Toolset Blocks and there isn't a way to disable them, I'm afraid.

#2492259

Hi Nigel,

Is there a way to hide it using css?

Thank you!

#2492667

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

It is possible only to hide the first image you shared and not the content inside the panel as it does not have a unique HTML class for Toolset and hiding one, will hide other boxes.

For the first image you can add the code below to the functions.php file of your theme:

add_action('admin_head', 'chr_admin_css');

function chr_admin_css() {
  echo '<style>
    .components-toolbar .toolset-inline-field-button {
		display: none !important;
	}
  </style>';
}

Thanks.

#2493223

Thank you Christopher! Your code work on hiding it on the contextual toolbar.
It will be great if we have the option to disable 'Dynamic Sources' from the block setting sidebar.

Anyway, thanks again!