Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Miko Raymundo
    Participant

    Hi. How can I add PHP codes in shortcode?

    For example, I want to add a script with “fetch”

    fetch('<?php echo get_rest_url(); ?>wordpress/v1/get/subscription-product', {
        method: 'GET',
    })...

    Note: I am currently developing on local, so I cannot provide my website yet.

    Hi Miko,

    Thanks for using Shortcoder.

    Shortcoder supports only HTML/CSS/JS as content.

    FAQ

    I would suggest plugins like below for your purpose.

    Insert PHP Code Snippet

    Thanks,
    Aakash

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter