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
add_filter( 'sunshine_action_menu', 'my_sunshine_action_menu' ); | |
function my_sunshine_action_menu( $menu ) { | |
global $sunshine; | |
if ( !empty( $sunshine->cart->content ) ) | |
$cart_count = '<span class="sunshine-count sunshine-cart-count">'.$sunshine->cart->item_count.'</span>'; | |
$menu[90] = array( | |
'name' => __( 'Cart','sunshine' ), | |
'url' => sunshine_url( 'cart' ), |
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
/* | |
Add a link to a Sunshine Photo Cart Main Menu | |
Add this code to your theme's functions.php | |
OR | |
Use this plugin: https://wordpress.org/plugins/my-custom-functions/ | |
*/ | |
add_filter( 'sunshine_main_menu', 'sunshine_custom_menu_item', 100 ); | |
function sunshine_custom_menu_item( $menu ) { | |
$menu[45] = array( // Change 45 to any number, it determines where in the menu it shows | |
'name' => 'PAGE_NAME_HERE', |
NewerOlder