This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Move #bottom after #container without messing with footer.php

  • Creator
    Topic
  • #13547
    royeyal
    Participant

    Hey there.
    I need to have a full width footer, so I have to move #bottom after #container.
    Can I do that without messing with footer.php?
    I don’t think remove_all_actions + do_action will do the trick.
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #13556
    Jason Bobich
    Keymaster

    Hi Roy,

    You’re not going to be able to move the actual #bottom container without editing footer.php. However, I would suggest just creating your own DIV with some other ID to use instead. Then, you could hook to themeblvd_after, which comes after the #container.

    Maybe something like this:

    /**
     * Remove default footer actions.
     */
    remove_action( 'themeblvd_footer_content', 'themeblvd_footer_content_default' );
    remove_action( 'themeblvd_footer_sub_content', 'themeblvd_footer_sub_content_default' );
    remove_action( 'themeblvd_footer_below', 'themeblvd_footer_below_default' );
    
    /**
     * Custom footer function to display dynamic footer elements.
     */
    function my_after() {
    	echo '<div id="my-bottom">';
    	themeblvd_footer_content_default();
    	themeblvd_footer_sub_content_default();
    	themeblvd_footer_below_default();
    	echo '</div><!-- #my-bottom (end) -->';
    }
    add_action( 'themeblvd_after', 'my_after' );

    Depending on the current styling of your child theme, I’m not sure if there will be any residual styling left over on #bottom, like random padding or whatever, but you could always just hide it.

    #bottom { display: none; }

    Or remove any padding, margin, or whatever’s there instead. Either way.

    #13683
    royeyal
    Participant

    It always looks simple when you’re handed with an elegant solution. Thank you! 🙂

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