How to Hide the Headway Footer Links with PHP

Headway lets you hide the footer links using the visual editor, but if you’re developing a child theme and want to mess with the footer, then this snippet is for you.

Learn how to make a child theme or download one of my pre-made themes.

First we’re going to create a function called “hide_this” that we can use with specific filters. Copy and paste the following code into your child theme’s functions.php file:

function hide_this() { return false; }

Now that we’ve defined that function, we can use it with pretty much any headway themes filter to get rid of content. In this case, we’re talking about the footer links specifically. Copy and paste the following code into functions.php to get rid of the footer links:

add_filter('headway_link', 'hide_this');
add_filter('headway_admin_link', 'hide_this');
add_filter('headway_go_to_top_link', 'hide_this');

I just want to let you know that this will work with other elements, such as the copyright message or the “comments for this post are closed” message that appears if you disable comments. Here are examples of those in action:

add_filter('headway_copyright', 'hide_this');
add_filter('headway_comments_closed ', 'hide_this');

For more stuff that you can hide with filters, check out the Headway Hook Codex. Also if you just want to use the visual editor to get rid of the links, I made a video for that.

Any Questions?

What questions do you have about hiding stuff in Headway? Share your questions and experiences in the comments section.

Want to see this in action? We covered it in the PHP/Hooks Introduction Webinar

One Response to How to Hide the Headway Footer Links with PHP

  1. Anders says:

    That did the trick, thanks! Great Headway resource, I´ll be back…

Leave a Reply

*