I’ve created a 404 error page in WordPress and am trying include a contact form in the 404.php template. So, I’ve installed the “Fast secure contact form” plugin and have created a post that includes the shortcode for said plugin. When I view the post for this plugin the contact form shows properly. When I try to manually inject the post into the 404.php template using:
$page_id = 4015;
$page_object = get_post( $page_id );
echo $page_object->post_content;
The shortcode just displays as text. Any help with this would be greatly appreciated …
Why not do it like this, add the shortcode to your 404 page.
You need not have to create a new post for the contact form.