I need to call a wordpress plugin shortcode to a different html page, this html page is not in wordpress pages or posts.<\/p>\n
I need to call my quform form to a seperate html page; I have tried the following:<\/p>\n
added the html file to the wp-content folder
\nadded the php code to call<\/p>\n
<?php if (function_exists('iphorm')) echo do_shortcode( '[iphorm id=\"2\" name=\"Contacts\"]'); ?>\n<\/code><\/pre>\nIt does nothing, no output of any sort.<\/p>\n
So how can I call wordpress plugin functions and their shortcodes to a html page file.<\/p>\n
Thanks<\/p>","upvoteCount":3,"answerCount":3,"datePublished":"2016-10-10T16:50:55.000Z","author":{"@type":"Person","name":"wrathyimp2373","url":"https://community.spiceworks.com/u/wrathyimp2373"},"acceptedAnswer":{"@type":"Answer","text":"
OK, got it done,<\/p>\n
but had to convert the file type from .html to php to make it work.<\/p>\n
So we need to create a php file and then echo the html contents.<\/p>\n
This is my test.php page which is not in the wordpress folder with the following code:<\/p>\n
<?php\nrequire( '../wp-load.php' );\n\necho '\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=\"utf-8\">\n</head>\n\n<body>\nCOntent';\n?>\n<?php echo do_shortcode(' [iphorm id=\"2\" name=\"Contacts\"] </body></html>\n'); ?>\n<\/code><\/pre>\nSo calling wp-load from the htdocs directory and saving the file as .php at teh root directory but not included in the wp-content folder.<\/p>","upvoteCount":0,"datePublished":"2016-10-11T06:00:08.000Z","url":"https://community.spiceworks.com/t/wordpress-shortcode-into-html-page/531634/3","author":{"@type":"Person","name":"wrathyimp2373","url":"https://community.spiceworks.com/u/wrathyimp2373"}},"suggestedAnswer":[{"@type":"Answer","text":"
I need to call a wordpress plugin shortcode to a different html page, this html page is not in wordpress pages or posts.<\/p>\n
I need to call my quform form to a seperate html page; I have tried the following:<\/p>\n
added the html file to the wp-content folder
\nadded the php code to call<\/p>\n
<?php if (function_exists('iphorm')) echo do_shortcode( '[iphorm id=\"2\" name=\"Contacts\"]'); ?>\n<\/code><\/pre>\nIt does nothing, no output of any sort.<\/p>\n
So how can I call wordpress plugin functions and their shortcodes to a html page file.<\/p>\n
Thanks<\/p>","upvoteCount":3,"datePublished":"2016-10-10T16:50:55.000Z","url":"https://community.spiceworks.com/t/wordpress-shortcode-into-html-page/531634/1","author":{"@type":"Person","name":"wrathyimp2373","url":"https://community.spiceworks.com/u/wrathyimp2373"}},{"@type":"Answer","text":"
I guess I need to include or call wordpress functions by loading wp-load.php<\/p>\n
But where to add the following code in the HTML page:<\/p>\n
<?php require( '../wp-content/wp-load.php' ); ?> \n<\/code><\/pre>","upvoteCount":0,"datePublished":"2016-10-11T05:42:59.000Z","url":"https://community.spiceworks.com/t/wordpress-shortcode-into-html-page/531634/2","author":{"@type":"Person","name":"wrathyimp2373","url":"https://community.spiceworks.com/u/wrathyimp2373"}}]}}