Using wordpress shortcodes to render PHP -
i'm trying create shortcode render custom php pages. i'm getting odd behaviour i'm not getting if used wordpress template. for example. if create template code: <article id="post-<?php the_id(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'blogposting' ); ?>> <div class="inside-article"> <?php $content = apply_filters( 'the_content', get_the_content() ); global $post; $post_info = get_post($post->id); $content = $post_info->post_content; $ind = strrpos($content, "/"); $page = substr($content, $ind+1); $path = substr($content, 0, $ind+1); $olddir = getcwd(); chdir($_server["document_root"].$path); include($page); chdir($olddir); ?> </div><!-- .inside-article --> </article><!-- #post-## --> then in wordpress page enter location of file, e.g. /contact/contact_form.php. contact_form.php page...