[wp-hackers] Shortcodes in Custom Menu Items

Jesse Friedman highfive at jesserfriedman.com
Thu May 30 15:44:50 UTC 2013


Hi Nick

I appreciate the help, yet it doesn't work. While it may return and do the
shortcode, the actual saving of the custom link strips the [  ] and you're
left with http://siteURL/about-us rather than http://[siteURL]/about-us


On Thu, May 30, 2013 at 11:28 AM, Nicholas Ciske <nl at thoughtrefinery.com>wrote:

> This will do it:
>
> add_filter('wp_nav_menu', 'do_menu_shortcodes');
> function do_menu_shortcodes( $menu ){
>         return do_shortcode( $menu );
> }
> _________________________
> Nick Ciske
> http://thoughtrefinery.com/
> @nciske
>
>
> On May 30, 2013, at 10:19 AM, Jesse Friedman wrote:
>
> > Is it possible to put a shortcode like [siteURL]/about-us in a custom
> menu
> > link?
> >
> > I know it isn't out of the box, but it doesn't look as easy as enabling
> > shortcodes in widgets and I can't find any documentation.
> >
> >
> >
> > --
> > thanks
> >
> > *jesse friedman*
> > jes.se.com *
> > *
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
thanks
*
*
*jesse friedman*
jes.se.com *
*
Book: Web Designers Guide to WordPress -
http://wdgwp.com/onamazon<http://wdgwp.com/onamazon>
Twitter: @professor <http://twitter.com/professor>
Facebook: Like<https://www.facebook.com/pages/Jesse-Friedman/204793299545174>


More information about the wp-hackers mailing list