Forums

Use of include in a page using PHP (4 posts)

  1. maddenuk
    Member
    Posted 2 years ago #

    Morning,

    I'm trying to use this line of code in a page however WordPress wont render it.

    <?php include("/includes/newsHome.php"); ?>

    Any advice?

    Thanks

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    You are putting that in a Page Template or do you have a php code plugin that allows you to put code in a page's content?

    Your includes begins with a / which may not be corret.

    Also note usage for :

    <?php include(TEMPLATEPATH."/functions..php"); ?>
  3. Stefano Lissa
    Member
    Posted 2 years ago #

    Use "include it" plugin.

  4. MichaelH
    Volunteer
    Posted 2 years ago #

    Just remembered--some php code plugins may not allow an include...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.