So I'm having an issue where I'm getting a 'Undefined function' response and I can't seem to figure out why and how to target it.
Relative path to the shortcode file: htdocs/wp-content/mu-plugins/s/shortcodes/profile.php
Relative path to the profile card: htdocs/wp-content/mu-plugins/s/templates/people-card.php
- (This is where I have some HTML)
What I'd like to achieve:
- Apply the shortcode to the page then have the shortcode function call the profile-card.php page and grab all the content within and display it.
So are the very end, the shortcode will show the 'profile-card.php' page.
The code I have inside shortcodes/profile.php:
function clearline_func() {
test();
}
add_shortcode('test', 'clearline_func');
I'm getting a Fatal error: Uncaught Error: Call to undefined function test()
error.
test();
, but that function doesn't exist. What are you expecting to happen?profile-card.php
directly but I wasn't getting any returns. What's the best method to include all content fromprofile-card.php
and use that shortcode to show it?