• Resolved Rafa?

    (@ayek)


    Hi!
    I wouldn’t want to load styles, scripts and the $footer in HTML, because there is no need for the stuff on my site (for the sake of performance).
    I can dequeue styles and scripts in functions.php
    if ( is_front_page() || is_home() || is_archive() )
    but have no idea how to override footer() to get rid of the HTML at these cases. Could you help me?
    May it be quite reasonable suggestion to add more filters (beside post/page IDs) in plugin’s options for further releases?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    See the FAQ how to exclude it on certain pages by using a filter. Just provide a filter for lbwps_enabled and return false. This should work for you in functions.php:

    function my_lbwps_enabled($enabled, $id)
    {
        if (is_front_page() || is_home() || is_archive()) {
            return false;
        }
    
        return $enabled;
    }
    
    add_filter('lbwps_enabled', 'my_lbwps_enabled', 10, 2);
    Thread Starter Rafa?

    (@ayek)

    Exactly! Thank You!!
    I’ve changed the condition to

    
    if ( is_singular() ) {
            return $enabled;
        }
        return false;
    

    and then exclude my custom front and blog pages by IDs (plugin settings).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to exclude on front page?’ is closed to new replies.