Option to disable All tab

Hi! I have a feature which I urgently need for my website :wink: , I imagine this might be an issue for others too. When using the Social Feed Widget: if multiple social media accounts are connected at the same time (like Instagram, Facebook & LinkedIn), the first tab/button that always opens and can’t be disabled is the “ALL” tab, which shows a feed of all the different platforms posts in one feed. If I post the same content on multiple sides this leads to the “same post” being shown multiple times.
This would be entirely fixed if I was just able to hide this first page and start the feed with one of the integrated Social Media Feeds. The page visitor would then still be able to switch between the different platforms feeds without identical posts clinging together!

I’m happy to clarify further if needed!

Thank you so much in advance! Kind regards, Lino

1 Like

Hi there and welcome to the Community, @user33572 :waving_hand:

Thank you so much for the feedback!

I agree that it would be great to have a toggle to disable the All tab right in the settings. We’ll try to consider this option in the future, especially if more users upvote this request.

As for now, you can hide the All tab using the script below in the Custom JS section on the Settings tab of your widget’s settings:

const waitForElement = (selector, root = document) =>
  new Promise((res) => {
    const observer = new MutationObserver(() => {
      const element = root.querySelector(selector);
      if (element) {
        res(element);
        observer.disconnect();
      }
    });

    observer.observe(root, {
      childList: true,
      subtree: true,
    });
  });

const init = async () => {
	const tabsContainer = await waitForElement('.es-tabs-container');
	const tabsNames = [...tabsContainer.querySelectorAll('.es-tab-item-source-name')];
	
	tabsNames.forEach((tabName) => {
		const text = tabName.textContent.toLowerCase();
		if (text === 'all') {
			tabName.closest('.es-tabs-slider-item').remove();
		}
		
		if (text === 'facebook') {
			tabName.click();
		}
	});
} 

init();

Note: Custom JS doesn’t function in the preview mode, so you can check the result right on your website or through the Share Link


Please try it out and let me know how it worked :wink: