Forked from jessepearson/woocommerce_get_shop_page_permalink.php
Created
September 11, 2019 14:41
-
-
Save pagelab/11f211d3d29324088691a03c2b140a16 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 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