• I’m attempting to include a php file on a page by adding shortcode. The snippet reads:

    <?php
    include "/selling_congruence.php";
    ?>

    The shortcode on the page is:

    [php snippet=1]

    The page template loads the page content with:

    <?php while ( have_posts() ) : the_post(); ?>
        <?php the_content(); ?>
        <?php endwhile; ?>

    The file I’m trying to load is named selling_congruence.php

    I’ve seen where others have done this successfully but had to make changes to pathing, but the file I’m trying to load are directly in the theme’s folder right next to the template file. I’m doing this on wamp right now or I would post a link. Can anyone see a reason this wouldn’t be working? Thanks in advance!

    https://wordpress.org/plugins/php-code-for-posts/

  • The topic ‘using’ is closed to new replies.