Prime Slider Logo
  • Pricing

How to turn off/on any Prime Slider widget by add_filter hook

  • Prime Slider
  • How to turn off/on any Prime Slider widget by add_filter hook

How to turn off/on any Prime Slider widget by add_filter hook

The WordPress add_filter Function makes it possible to erase or hide contents inside your dashboard. It can impact any sliders and plugins using a few lines of coding.

Prime Slider has invested a lot of man-force to develop its code structure. It’s light as well as efficient at the same time. While the Add-filter option wasn’t important for general users, developers highly recommend this feature.

So, Prime Slider has integrated the add_filter function with WordPress. Let us introduce you to it.

Prime Slider with add_filter function

This is a feature that can only be accessed through WP backend services. So, before we start, make sure you seek a developer or know the stuff yourself.

The add_filter option sets filters around any target object through coding. Once applied, you can shut off any content within our Prime Slider plugin from widgets to the dashboard itself.

This feature comes in handy to erase sliders that are not needed inside your website. Simply deactivating a slider does not erase its residual files. But with the filter function, you can simply vanish a slider along with its residual files. It helps to reduce the total plugin size and gives a boost to the system.

Although Prime Slider is lightweight and doesn’t feed on your server memory, filters keep your workspace clean and composed. That’s why we made it for developers.

How to access add_filter() hook

To access the filter function, you have to open WordPress through backend services.

Once you are there, find Prime Slider under the Plugins folder. Scroll a little below and you will see the element_pack_filters.php file. This is the structure for applying filters to elements. Each portion marked like the red box is a filter function for different contents.

Currently, we have installed the filter for Prime Slider widgets and the dashboard. We will bring more changes in the future.

Then at the below, write the following line as shown with a red underline. The red box holds the widget name. You can put any slider name from Prime Slider and turn it off completely from the dashboard. The __return_false function does the magic.

For Example

Take PS’s Woocommerce slider as an example. You can find it inside the widget menu and drag-drop it inside your page. This widget allows you to hide texts, images, and templates under foldable sub-titles.

add_filter (‘primeslider/widgets/woocommerce’ , ‘__return_false’);

Now, insert the add_filter code like that shown above.

Go back to the page editor and refresh the page. You will see the widget disappeared in both menu and page.

This way, you can use the add_filter function for every slider widget from the Prime Slider plugin along with its dashboard.

Here the list of all filters that you can use:

// For Turn Off Dashboard (dashboard Hide Only Works With Agency Package After Activate License)
add_filter( 'primeslider/settings/dashboard', '__return_false' );
// For Turn Off Affiliation
add_filter( 'primeslider/settings/affiliation', '__return_false' );
// For Turn Off Account
add_filter( 'primeslider/settings/account', '__return_false' );
// For Turn Off Contact
add_filter( 'primeslider/settings/contact', '__return_false' );
// For Turn Off Upgrade Mode
add_filter( 'primeslider/settings/upgrade_mode', '__return_false' );
// For Turn Off Giveaway Notice
add_filter( 'primeslider/settings/giveaway_notice', '__return_false' );
// For Turn Off Blog Widget
add_filter( 'primeslider/widgets/blog', '__return_false' );
// For Turn Off Dragon Widget
add_filter( 'primeslider/widgets/dragon', '__return_false' );
// For Turn Off Flogia Widget
add_filter( 'primeslider/widgets/flogia', '__return_false' );
// For Turn Off General Widget
add_filter( 'primeslider/widgets/general', '__return_false' );
// For Turn Off Isolate Widget
add_filter( 'primeslider/widgets/isolate', '__return_false' );
// For Turn Off Mount Widget
add_filter( 'primeslider/widgets/mount', '__return_false' );
// For Turn Off Multiscroll Widget
add_filter( 'primeslider/widgets/multiscroll', '__return_false' );
// For Turn Off Pagepiling Widget
add_filter( 'primeslider/widgets/pagepiling', '__return_false' );
// For Turn Off Sequester Widget
add_filter( 'primeslider/widgets/sequester', '__return_false' );
// For Turn Off Custom Widget
add_filter( 'primeslider/widgets/custom', '__return_false' );
// For Turn Off Fluent Widget
add_filter( 'primeslider/widgets/fluent', '__return_false' );
// For Turn Off Flexure Widget
add_filter( 'primeslider/widgets/flexure', '__return_false' );
// For Turn Off Monster Widget
add_filter( 'primeslider/widgets/monster', '__return_false' );
// For Turn Off Event Calendar Widget
add_filter( 'primeslider/widgets/event_calendar', '__return_false' );
// For Turn Off Woostand Widget
add_filter( 'primeslider/widgets/woostand', '__return_false' );
// For Turn Off Woocommerce Widget
add_filter( 'primeslider/widgets/woocommerce', '__return_false' );



Copyright © 2024 BdThemes. All Rights Reserved.
Payment Method