Support » Plugin: Ajaxize » Possible to load php snippets or shortcodes?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author yoav.aner

    (@yoavaner)

    Hi Mr-B,

    The only benefit of creating a shortcode is to allow you to re-use PHP functions inside your own HTML. Since you’re essentially defining a function, which the shortcode runs – why not just create this function inside your functions.php and call it from ajaxize (or from the shortcode). So for example, in functions.php define

    function some_function() {
     // place code here
    }

    Then use some_function with ajaxize, and also you can define a shortcode some_shortcode that simply calls some_function()

    Hope this helps
    Cheers
    Yoav

    Yes, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Possible to load php snippets or shortcodes?’ is closed to new replies.