Support » Plugin: Shortcode in Menus » Will php work?

Viewing 1 replies (of 1 total)
  • Plugin Author Gagan Deep Singh



    Sorry to disappoint you, but writing PHP code wouldn’t work.

    Though you can add some custom plugin or add your code in theme’s functions.php file and add a shortcode to your function, something like:

    function hello_world() {
        // Your PHP Code
        return 'Hello World';
    add_shortcode( 'hello-world', 'hello_world' );

    and then you can use [hello-world] as shortcode in the menu, whatever that function will return, will be placed in the menu.

    • This reply was modified 1 year, 1 month ago by  Gagan Deep Singh. Reason: Correcting syntax
Viewing 1 replies (of 1 total)
  • The topic ‘Will php work?’ is closed to new replies.