Last active
September 11, 2019 14:41
-
-
Save jessepearson/3921474b45d9b0e0fb5a7c84af158bff to your computer and use it in GitHub Desktop.
This will turn the shop page permalink into a link for the home page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not copy this line | |
/** | |
* This will turn the shop page permalink into a link for the home page. | |
* @param str $link The permalink that's presently being filtered. | |
* @return str The permalink you'd like to send instead. | |
*/ | |
function jp_woocommerce_get_shop_page_permalink( $link ) { | |
$link = get_home_url(); | |
return $link; | |
} | |
add_filter( 'woocommerce_get_shop_page_permalink', 'jp_woocommerce_get_shop_page_permalink' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment