[Resolved] Remove "copyright-bar" div

Home Forums Support [Resolved] Remove "copyright-bar" div

Home Forums Support Remove "copyright-bar" div

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #520619
    Dan

    Hi
    I would like to remove the copyright bar, but not with “disaply:none”, but rather using a function.
    Is there an available filter/hook for that?
    The ‘tu_remove_footer’ function removes the whole bottom part, and I would like to remove just the copyright DIV.

    Thanks,
    Dan

    #520666
    Dan

    Found this:
    https://gist.github.com/generatepress/36c0c52479679252af28
    Which removes the actual content but doesn’t remove the “copyright-bar” div.
    Maybe adding a checkbox in the customizer: “Remove copyright” could also do the job?

    Thanks,
    Dan

    #520820
    Leo
    Staff
    Customer Support

    Hi Dan,

    Is this the snippet you’ve tried?

    add_action( 'after_setup_theme','tu_remove_footer' );
    function tu_remove_footer() {
        remove_action( 'generate_footer','generate_construct_footer' );
    }

    It should only remove the copyright bar and nothing else.

    #520834
    Dan

    Hi Leo, thanks for replying,
    Yes, I’ve tried that snippet which removes “footer-bar” div, I have a few links in there that I want to keep.
    I just wanted to completely remove the “copyright-bar” div, which is the div under the “footer-bar”

    Dan

    #521279
    Tom
    Lead Developer
    Lead Developer

    Unfortunately that div can’t be removed without removing the entire footer: https://github.com/tomusborne/generatepress/blob/2.0.2/inc/structure/footer.php#L33-L44

    You could remove the footer, then add your own footer with the data you need?

    Let me know πŸ™‚

    #521681
    Dan

    Thanks Tom,
    So I’ll use this snippet:

    add_action('after_setup_theme','generate_copyright_remove_default_message');
    function generate_copyright_remove_default_message()
    {
    		
    	remove_action( 'generate_credits', 'generate_add_footer_info' );
    	remove_action( 'generate_copyright_line','generate_add_login_attribution' );
    }
    

    It removes the content, not the DIV itself. I can live with that πŸ™‚

    Thanks
    Dan

    #521803
    Tom
    Lead Developer
    Lead Developer

    No problem, glad you found something that works πŸ™‚

    #613268
    neverything

    Just a quick note, I added this to functions.php and it killed the black bar entirely, as I wanted:

    // make entire black bottom footer copyright bar disappear
    function generate_construct_footer() {}
    #613586
    Tom
    Lead Developer
    Lead Developer

    I don’t suggest that method. Instead, I would do this:

    remove_action( 'generate_footer', 'generate_construct_footer' );

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.