coresocial_floating_show

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

Description

Filters the visibility of the Floating bar. Use this filter to hide the floating bar on selected pages, by returning false.

Definition
apply_filters( coresocial_floating_show, $visibility );
Arguments
Name
Type
Description
visibility
bool
By default, TRUE, and the floating bar will be added to the page. Return FALSE to hide the bar.
true

Example

Disable Floating Bar on the home page

add_filter('coresocial_floating_show', 'dev4press_example__coresocial_floating_show');
function dev4press_example__coresocial_floating_show($visibility) {
  if (is_home() || is_front_page()) {
    $visibility = false;
  }

  return $visibility;
}
0
0
56
Rate this reference

You are not allowed to rate this post.

Leave a Comment