Maher Sammoudi
Maher Sammoudi

Reputation: 67

show shortcode in externel php file

i'm using a social login plugin and i have created another php file ( mydomain.Com/wizard/index.php )

and i want to include the shortcode tat show the icons of social login to help users to register/login using social medias.

the steps are showed here

https://docs.oneall.com/plugins/guide/social-login-wordpress/#4

i tried this

<?php require($_SERVER['DOCUMENT_ROOT'].'/wp-load.php'); ?>
<?php echo do_shortcode('[oa_social_login]'); ?>
<?php do_action('[oa_social_login]'); ?>

but nothing is showed however the shortcode [oa_social_login] is working in pages correctly.

Upvotes: 1

Views: 49

Answers (1)

user3053216
user3053216

Reputation: 809

You should not include square brackets in the shortcode functions:

<?php require($_SERVER['DOCUMENT_ROOT'].'/wp-load.php'); ?>
<?php echo do_shortcode('oa_social_login'); ?>
<?php do_action('oa_social_login'); ?>

Upvotes: 1

Related Questions