Articles on: Developers

Examples of usage of Hooks in the Zakra Theme

You can use hooks to add your custom code to the theme.

Few examples of usage of hooks are as follows:



In the Pro version of Zakra, you can enable or disable the Footer Bottom Bar. If you want to remove the Footer Bottom Bar in the free version, however, you can do so using code given below:

function remove_footer_bar() {
	remove_action( 'zakra_action_footer_bottom_bar', 'zakra_footer_bottom_bar');
}
add_action( 'after_setup_theme', 'remove_footer_bar' );



To change the Scroll To Top icon using FIlter Hook:


In the Pro version, there is an option to change the Scroll to Top icon easily. While using the Free version, you can change the icon using code given below:

function scroll_to_top_icon() {
	return 'fa-chevron-up';
}

function scroll_to_top_icon_class() {
	return 'fa';
}

add_filter( 'zakra_scroll_to_top_icon', 'scroll_to_top_icon' );
add_filter( 'zakra_scroll_to_top_icon_class', 'scroll_to_top_icon_class' );


Some Relevant Links:

How to use Hooks in the Zakra Theme?

Available Hooks in Zakra the Theme

Updated on: 13/09/2019

Was this article helpful?

Share your feedback

Cancel

Thank you!