[wp-hackers] Shortcodes in Custom Menu Items

Jesse Friedman highfive at jesserfriedman.com
Thu May 30 21:07:23 UTC 2013


To be clear you're able to put the shortcode in the URL Field of a Custom
Link in the menus section of the admin?

My shortcodes are being stripped on save and I even tried it with a fresh
WordPress 3.5.1 install, with no plugins running 2012.


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

> I tested the code and it worked fine for me... [shortcode] showed up
> (using a custom menu item), then the shortcode output showed up when I
> wired it to a function.
>
> Something outside core (theme or plugin) is filtering your menus and
> stripping out the [].
>
> You could also do %SITEURL% or {SITEURL} (or whatever does not get
> stripped, even just SITEURL) and use str_replace instead of a shortcode
> solution.
>
> _________________________
> Nick Ciske
> http://thoughtrefinery.com/
> @nciske
>
> On May 30, 2013, at 10:44 AM, Jesse Friedman wrote:
>
> > 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
> >
>
> _______________________________________________
> 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