• Please let me know, how do I generate shortcode that can be used in dashboard pages of WP when template shortcode via PHP is available.

    I know that ‘echo do_shortcode(‘[shortcode]’)’ works for viceversa

Viewing 7 replies - 1 through 7 (of 7 total)
  • Have you reviewed the Shortcode_API?

    Thread Starter rampriya

    (@rampriya)

    Yes I did.
    I understood that if we need a fresh shortcode for any custom functionality, we can get as specified in Shortcode_API.

    I need shortcode for a predefined one.
    Actually I need it for, <?php echo s2member_pro_login_widget(); ?>

    Thanks for ur immediate response

    You should be able to build a shortcode for this via your theme’s functions.php file.

    Thread Starter rampriya

    (@rampriya)

    You mean that, I should capture the functionality of this and recreate the same in theme’s functions.php and generate the shortcode. Did I understand correct?

    Yes – that sounds correct.

    Thread Starter rampriya

    (@rampriya)

    Yea. Thank u ??

    But if plugin’s this functionality is updated, my code in theme file will remain the same… ??

    But is there anyway to overcome this? Any dynamic way like do_shortcode()?

    Hope I m not troubling with bunch of questions

    Thank u

    my code in theme file will remain the same

    Correct.

    Any dynamic way like do_shortcode()?

    Not really, no.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to generate shortcode from template shortcode and viceversa’ is closed to new replies.