SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    728
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    trying to include a file into a wp page.

    I am trying to call in a carousel. I saved it on its own php file. and am trying to call it in custom page by using
    PHP Code:
    <?php include(ABSPATH 'carousel.php'); ?>
    Not working. Could someone please advs I also tried
    PHP Code:
    <?php include(STYLESHEETPATH.'carousel.php');?>
    And that did not work either.
    got the error message:

    Warning: include(C:\xampp\htdocs\apdSilencers/carousel.php): failed to open stream: No such file or directory in C:\xampp\htdocs\apdSilencers\wp-content\themes\apd\home.php on line 12

    Warning: include(): Failed opening 'C:\xampp\htdocs\apdSilencers/carousel.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\apdSilencers\wp-content\themes\apd\home.php on line 12
    thank you
    dlm

  2. #2
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    728
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Never mind all. I got it. In case this helps anyone in the future.
    used
    Code:
    <?php get_template_part('carousel', 'page'); ?>
    to call it.
    You all have an awesome weekend.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •