php or shortcodes from within a menu item/link?
-
I’m curious if anyone knows of a way to execute a php snippet, or a shortcode, to appear in a menu item?
Basically, I have a line of shortcode (or the comparable php snippet) that displays a number of items in a shopping cart. I’d like to have that number show up in the menu and update as a customer adds items, similar to how it’s handled on Amazon with their ‘cart’ link in the menu.
I’ve tried a number of things, playing with functions, trying to put something into a php variable in the WP menu nav settings. But no go. I doubt I’m the only one who has wanted something like this (eh, Amazon did :), so if it’s out there I’d appreciate any suggestions.
Thanks,
-C
- The topic ‘php or shortcodes from within a menu item/link?’ is closed to new replies.